Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ludeeus/pyaftership
Async Python wrapper for the AfterShip API
https://github.com/ludeeus/pyaftership
Last synced: 12 days ago
JSON representation
Async Python wrapper for the AfterShip API
- Host: GitHub
- URL: https://github.com/ludeeus/pyaftership
- Owner: ludeeus
- License: mit
- Created: 2018-08-17T08:35:25.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T06:09:10.000Z (20 days ago)
- Last Synced: 2024-10-24T13:07:42.531Z (20 days ago)
- Language: Python
- Homepage: https://pypi.org/project/pyaftership/
- Size: 123 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyaftership
[![codecov](https://codecov.io/gh/ludeeus/pyaftership/branch/main/graph/badge.svg)](https://codecov.io/gh/ludeeus/pyaftership)
![python version](https://img.shields.io/badge/Python-3.12-blue.svg)
[![PyPI](https://img.shields.io/pypi/v/pyaftership)](https://pypi.org/project/pyaftership)
![Actions](https://github.com/ludeeus/pyaftership/workflows/Actions/badge.svg?branch=main)_Async Python wrapper for the AfterShip API_
## Installation
```bash
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.
```python
import asyncio
import aiohttp
from pyaftership import AfterShipAPI_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!
1. Fork the repository
2. Clone the repository locally and open the devcontainer or use GitHub codespaces
3. Do your changes
4. Lint the files with `scripts/lint`
5. Ensure all tests passes with `scripts/test`
6. Ensure 100% coverage with `scripts/coverage`
7. Commit your work, and push it to GitHub
8. Create a PR against the `main` branch