API client used to access Pngme's financial data APIs.
Project description
Python API Client
This package exposes a synchronous and asynchronous client used to interact with Pngme's financial data APIs.
Install
Install the latest version with:
pip3 install pngme-api
Quick start
Create a Client
instance using your API token
found in the Pngme Dashboard:
from pngme.api import Client
token = "" # your token
client = Client(token)
If you're using
asyncio
, you can import and use theAsyncClient
instead.
We can list or search the available /users
:
users = client.users()
users = client.users(search="2343456789012")
For a user of interest, we can get a list of the user's /accounts
:
user_uuid = "33b6215d-3d75-4271-801c-6da27603a8be"
accounts = client.accounts.get(user_uuid=user_uuid)
Then for a given account, we can get a list of the user's /transactions
, /balances
, or /alerts
:
user_uuid = "33b6215d-3d75-4271-801c-6da27603a8be"
account_uuid = "zenithbank"
transactions = client.transactions.get(user_uuid=user_uuid, account_uuid=account_uuid)
balances = client.balances.get(user_uuid=user_uuid, account_uuid=account_uuid)
alerts = client.alerts.get(user_uuid=user_uuid, account_uuid=account_uuid)
Development environment
We use Poetry to build, package, and publish this project. You'll need to install Poetry to use the development tools.
Clone this repo and install the development dependencies:
make install
You may need to configure your IDE to point to the newly created virtual environment after running install.
This will create a virtual environment in the .venv
directory, which is the convention Pipenv and poetry both use for in-project virtual environments.
You can type make help
to see a list of other options, which aren't strictly necessary as part of our day-to-day development practices.
Integration tests
You can replicate the integration tests (which run in a GitHub action on every push) locally:
make ci
Dependencies
Production dependencies are listed in setup.cfg under options.install_requires
, see setuptools
dependency management.
Development dependencies are listed in requirements.txt.
Running make install
will install both production and development dependencies. Running pip install .
(where .
is the path to the directory containing pyproject.toml) will install only the production dependencies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pngme_api-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6760f0235c2446dd4ae1c7d155c4e6b72bfbeffa3c324f9c1f8e8db65addfba3 |
|
MD5 | 2317ebc3052a0e69f22dde5448b987d0 |
|
BLAKE2b-256 | 5b16c17e31580986fc4dda8e42072531da6dc72355da6903a719af76f1350301 |