diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0675156 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +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: Set PYTHONPATH + run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV + + - name: Run examples + run: | + for script in examples/*.py; do + python3 "$script" + done diff --git a/.gitignore b/.gitignore index 65eb1ca..3137c6c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ __pycache__/ .DS_Store pyrightconfig.json README-PYPI.md + +poetry.lock +/myenv +/dist/ \ No newline at end of file diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index aef63ae..111151c 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,6 +25,7 @@ python: description: Python Client SDK Generated by Speakeasy. enumFormat: enum envVarPrefix: MOOV + homepage: https://github.com/moovfinancial/moov-python fixFlags: responseRequiredSep2024: true flattenGlobalSecurity: true diff --git a/examples/accounts.py b/examples/accounts.py new file mode 100644 index 0000000..e54a0a6 --- /dev/null +++ b/examples/accounts.py @@ -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) diff --git a/examples/hello_world.py b/examples/hello_world.py new file mode 100644 index 0000000..9771733 --- /dev/null +++ b/examples/hello_world.py @@ -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() diff --git a/pyproject.toml b/pyproject.toml index 9ac6c25..50e69a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ typing-inspect = "^0.9.0" mypy = "==1.10.1" pylint = "==3.2.3" types-python-dateutil = "^2.9.0.20240316" +pytest = "^8.3.3" [build-system] requires = ["poetry-core"]