-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples: add hello world and list accounts
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install | ||
- name: Build SDK | ||
run: | | ||
touch README-PYPI.md | ||
poetry build | ||
- name: Install SDK | ||
run: | | ||
pip install dist/moov-*.whl | ||
- name: Set PYTHONPATH | ||
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | ||
|
||
- name: Run examples | ||
run: | | ||
for script in examples/*.py; do | ||
python3 "$script" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ __pycache__/ | |
.DS_Store | ||
pyrightconfig.json | ||
README-PYPI.md | ||
|
||
poetry.lock | ||
/myenv | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import moov | ||
from moov import Moov | ||
import os | ||
|
||
s = Moov( | ||
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""), | ||
) | ||
|
||
res = s.accounts.list_accounts(request={ | ||
"name": "Lincoln National Corporation", | ||
# "email": "someone@moov.io", | ||
# "type": moov.AccountType.BUSINESS, | ||
# "foreign_id": "4528aba-b9a1-11eb-8529-0242ac13003", | ||
# "include_disconnected": True, | ||
# "count": 10, | ||
# "skip": 10, | ||
}) | ||
|
||
if res is not None: | ||
print(res) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from moov import some_module | ||
|
||
def main(): | ||
# Example code using the library | ||
print(some_module.some_function()) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters