https://github.com/happyleavesaoc/python-upsmychoice
https://github.com/happyleavesaoc/python-upsmychoice
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/happyleavesaoc/python-upsmychoice
- Owner: happyleavesaoc
- License: mit
- Created: 2017-02-07T14:42:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T18:22:55.000Z (over 4 years ago)
- Last Synced: 2024-11-01T09:38:07.458Z (7 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/upsmychoice)
# python-upsmychoice
Python 3 API for [UPS My Choice](https://www.ups.com/mychoice/), a way to track packages.
## Prerequisites
Sign up for UPS My Choice and verify your address.
## Install
`pip install upsmychoice`
## Usage
```python
import upsmychoice# Establish a session.
# Use the login credentials you use to login to UPS My Choice via the web.
# A login failure raises a `UPSError`.
session = upsmychoice.get_session("username", "password")# Get all packages that UPS My Choice knows about.
packages = upsmychoice.get_packages(session)
```## Caching
Session cookies are cached by default in `./upsmychoice_cookies.pickle` and will be used if available instead of logging in. If the cookies expire, a new session will be established automatically.## Development
### Lint
`tox`
### Release
`make release`
### Contributions
Contributions are welcome. Please submit a PR that passes `tox`.
## Disclaimer
Not affiliated with UPS.