Async Python wrapper for the AfterShip API.
Project description
pyaftership
Async Python wrapper for the AfterShip API
Installation
python3 -m pip install pyaftership
Example usage
Here is an example of what you can do, more examples can be found in the tests
directory.
import asyncio
import aiohttp
from pyaftership import AfterShip
API_KEY = 'XXXXXXXX0000000000XXXXXXXX0000000XXXXX000'
async def example():
"""Get trackings."""
async with aiohttp.ClientSession() as session:
aftership = AfterShip(API_KEY, session)
trackings = await aftership.trackings.list()
print("Pending trackings:", trackings["trackings"])
asyncio.get_event_loop().run_until_complete(example())
Contribute
All contributions are welcome!
- Fork the repository
- Clone the repository locally and open the devcontainer or use GitHub codespaces
- Do your changes
- Lint the files with
scripts/lint
- Ensure all tests passes with
scripts/test
- Ensure 100% coverage with
scripts/coverage
- Commit your work, and push it to GitHub
- Create a PR against the
main
branch
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
pyaftership-23.1.0.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file pyaftership-23.1.0.tar.gz
.
File metadata
- Download URL: pyaftership-23.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1438bb40590c6528ef2dfaacf92e491f23efaecf119e3ecae5b0f9b4d863956 |
|
MD5 | fd0ec94c660806364fa17e7fa664f180 |
|
BLAKE2b-256 | c82767ef631c7fb50934dfe946aedcd75c3f2af60fe58a1e881511440fc3d94a |
File details
Details for the file pyaftership-23.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyaftership-23.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 316e4331f3ac28fd6eb144f72a253352b2092d3aa73ef2179c74511cfef98d96 |
|
MD5 | 72b7e28097d26a8e822a18bdd1145dc4 |
|
BLAKE2b-256 | 395494cb3fabeeccc842d4dd14ccab7731dedc8528c28418eab6ac27c3eba44b |