Modern Python interface to the exact online API
Project description
ExactPy
A modern, highly configurable Python interface to the Exact Online API based on Pydantic.
Why?
Currently available packages aren't configurable in such a way that they are usable to me. This package attempts to fix that.
Sample usage
Initial oauth token request
This initial token request theoretically needs to be done once. An access token and requets token will be available after this. If the access token is refreshed in time (refresh token is valid for 30 days max), no log in has to be performed.
from exactpy.client import Client
client = Client(
client_id="xxx",
client_Secret="xxx,
verbose=True,
)
# this can literally be anything, but it needs to be valid
# so that redirects can happen
redirect_url = "https://some_website"
print(client.get_authorization_url(redirect_url=redirect_url)
# Now, open the url that was printed, log in to exactonline and copy the response url
response_url = "<paste_url_here>"
# Now retrieve the access token and refresh token
client.retrieve_token(response_url=response_url)
client.cache_credentials()
If your cache callable was not set to None, your credentials should now have been saved. In the default case, they're saved in creds.json (plain text).
Now you can use the client like below:
from exactpy.client import Client
client = Client(
client_id="xxx",
client_Secret="xxx,
verbose=True,
)
client.load_credentials()
client.check_token_validity()
client.cache_credentials()
# Every request you do, will trigger a token
# check as well. In the default case, auto-caching is done
# This means that the current access token and refresh token
# (after a optional refresh) are cached. This is only true
# if cache_callable was not set to None.
# To disable this behaviour, either set cache_callable to None
# or set autocache_enabled to False.
accounts = client.accounts.all()
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exactpy-0.0.8.tar.gz.
File metadata
- Download URL: exactpy-0.0.8.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c85f658cafa3954c51800e3aeba96602ac44bf4d08908e9c8305ae73dff3292
|
|
| MD5 |
6d13267b9b187704b415d7033bc636bd
|
|
| BLAKE2b-256 |
8f00ef79bfa47a9638d7f29d524a65d636ed3d17811fd0788dcb8e33acce8edd
|
Provenance
The following attestation bundles were made for exactpy-0.0.8.tar.gz:
Publisher:
publish.yml on riccardo92/exactpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exactpy-0.0.8.tar.gz -
Subject digest:
9c85f658cafa3954c51800e3aeba96602ac44bf4d08908e9c8305ae73dff3292 - Sigstore transparency entry: 605352749
- Sigstore integration time:
-
Permalink:
riccardo92/exactpy@cf680cffe8a2cc71f47b44d88fe9c8def737a16c -
Branch / Tag:
refs/tags/0.0.8 - Owner: https://github.com/riccardo92
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf680cffe8a2cc71f47b44d88fe9c8def737a16c -
Trigger Event:
push
-
Statement type:
File details
Details for the file exactpy-0.0.8-py3-none-any.whl.
File metadata
- Download URL: exactpy-0.0.8-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a043c1b62753409da86b942641f59563db179e7f1e2d5a379dfb0042d597d29
|
|
| MD5 |
04337fa6a4936835b13ce1ec2179d073
|
|
| BLAKE2b-256 |
244d8f86671935763b535e8ef4a297c2f434037f18e18621177ea84a7fd5e8eb
|
Provenance
The following attestation bundles were made for exactpy-0.0.8-py3-none-any.whl:
Publisher:
publish.yml on riccardo92/exactpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exactpy-0.0.8-py3-none-any.whl -
Subject digest:
3a043c1b62753409da86b942641f59563db179e7f1e2d5a379dfb0042d597d29 - Sigstore transparency entry: 605352750
- Sigstore integration time:
-
Permalink:
riccardo92/exactpy@cf680cffe8a2cc71f47b44d88fe9c8def737a16c -
Branch / Tag:
refs/tags/0.0.8 - Owner: https://github.com/riccardo92
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf680cffe8a2cc71f47b44d88fe9c8def737a16c -
Trigger Event:
push
-
Statement type: