| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Install shipengine via pip:
pip install shipengineThe following assumes that you have already set the SHIPENGINE_API_KEY environment variable with your API Key using os.environ["SHIPENGINE_API_KEY"] = "<YOUR_API_KEY_HERE>".
import os
from shipengine import ShipEngine
api_key = os.getenv("SHIPENGINE_API_KEY")
shipengine = ShipEngine(api_key)import os
from shipengine import ShipEngine
api_key = os.getenv("SHIPENGINE_API_KEY")
shipengine = ShipEngine(
{"api_key": api_key, "page_size": 75, "retries": 3, "timeout": 10}
)You will need to install Python3.10 or higher if you do not have it locally, before working on this project.
This project uses Poetry to manage project dependencies, build steps, and publishing to PYPI.
You can use the following curl command to download Poetry from your terminal is you are on osx / linux / bashonwindows:
curl -sSL https://install.python-poetry.org | python3 -bin/setupIf your changes require you to install a python package/module using poetry add <some package> or poetry add <some package> -D for a dev dependency. You will also need to run the following command to regenerate a requirements.txt file that includes the newly added dependencies:
poetry export -f requirements.txt --output requirements.txt --without-hashes --devWe are using Pre-Commit to enforce formatting, lint rules, and code analysis so that this repo is always in good health.
Pre-Commit is installed and initialized when you run bin/setup from the project root as outlined above.
If you choose not to use Poetry and prefer pip you can simply run pip install -r requirements.txt To be able to commit & push a PR to the repo after making changes locally, you will need to install pre-commit which is a tool that runs tests, linting, formatting, and code analysis on your changes.
pre-commit installNote: The checks run in pre-commit hooks are the same checks run in CI in our GitHub Actions.
You can run the tests in the tests/ directory using Pytest in the Poetry environment like this:
poetry run pytestOR via Tox:
poetry run toxYou can run the linting environment in Tox using this command:
poetry tox -e lintThis project uses release-please to automate releases. When a PR is merged, release-please reads the commit history to determine the next version and open a release PR. When that release PR is merged, the package is automatically published to PyPI.
This only works if commit messages follow the Conventional Commits format:
<type>: <short description>
Common types and their effect on versioning:
| Type | Version bump | Example |
|---|---|---|
| feat | minor (1.0.0 → 1.1.0) | feat: add label void endpoint |
| fix | patch (1.0.0 → 1.0.1) | fix: correct timeout default |
| chore, docs, refactor | none (no release) | chore: update dev tooling |
| feat! or fix! (breaking) | major (1.0.0 → 2.0.0) | feat!: remove deprecated method |
PRs with non-conforming titles will cause release-please to skip that commit silently, potentially blocking future releases.
| Back | FazBrowse Home | New Git URL |