Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g4brielvs/sheepped
🚚 A Python wrapper for tracking delivery (e.g. USPS)
https://github.com/g4brielvs/sheepped
json-api python-wrapper shipping usps
Last synced: about 1 month ago
JSON representation
🚚 A Python wrapper for tracking delivery (e.g. USPS)
- Host: GitHub
- URL: https://github.com/g4brielvs/sheepped
- Owner: g4brielvs
- License: mit
- Created: 2019-02-05T03:51:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-14T04:34:44.000Z (about 5 years ago)
- Last Synced: 2024-10-04T22:16:45.395Z (about 1 month ago)
- Topics: json-api, python-wrapper, shipping, usps
- Language: Python
- Homepage: https://pypi.org/project/sheepped/
- Size: 16.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/g4brielvs/sheepped.svg?branch=master)](https://travis-ci.org/g4brielvs/sheepped/)
[![PyPI](https://img.shields.io/pypi/v/sheepped.svg)](https://pypi.python.org/pypi/sheepped)
[![Versions](https://img.shields.io/pypi/pyversions/sheepped.svg)](https://pypi.python.org/pypi/sheepped)
# Sheepped
🚚 A Python wrapper for tracking delivery (e.g. USPS).* [Getting Started](#getting-started)
* [Usage](#usage)
* [Testing](#tests)
* [Versioning](#versioning)## Getting Started
First, install the package from [PyPI using `pip`](https://pypi.org/project/pip/).
$ pip install sheepeed
Now, register at [USPS](https://registration.shippingapis.com) to get your `USPS_USER_ID`.
## Usage
Suppose you have set an environment variable `USPS_USER_ID` with your USPS ID and your tracking number is `42`:
```python
from sheepped import USPSusps = USPS()
usps.track("42")
```If you have a bucnh of tracking numbers, you might want to use the async API:
```python
import asynciofrom sheepped import USPS
usps = USPS()
async def main():
tracking_numbers = ("1", "2", "3", "5", "8", "13", "21")
tasks = tuple(usps.aiotrack(n) for n in tracking_numbers)
return await asyncio.gather(*tasks)asyncio.run(main())
```## Tests
$ python setup.py test
## Versioning
Always suggest a version bump. We use [Semantic Versioning](http://semver.org).
MICRO: the API is the same, no risk of breaking code
MINOR: values have been added, existing values are unchanged
MAJOR: existing values have been changed or removed