Billing service library for API usage tracking and Stripe integration.
Project description
augint-billing-lib (full library bundle)
One package (augint_billing_lib) + one CLI (augint). All runtime logic lives here; IaC should be thin shims.
What it contains
- Core:
BillingServicewith Stripe/DynamoDB/API Gateway usage orchestration - Adapters: Stripe, DynamoDB repo, API Gateway usage, API Gateway plan admin
- Bootstrap: env + Secrets Manager wiring, CFN output discovery, plan move dispatcher
- CLI:
augintwithenv-dump,handle-event,sync-usage,promote,demote, and optionaldeploy/deletehelpers
Env (uses your names; no new required keys)
Required: STACK_NAME, AWS_REGION, STRIPE_SECRET_KEY
Optional: API_USAGE_PRODUCT_ID, STRIPE_SECRET_ARN, TABLE_NAME, FREE_USAGE_PLAN_ID, METERED_USAGE_PLAN_ID
Typical local flows
# 0) Install deps in your Poetry project: click, python-dotenv, boto3, stripe
# 1) Show env the CLI sees
poetry run augint env-dump
# 2) Simulate a Stripe event (and move keys between FREE_10K/METERED inside AWS)
poetry run augint handle-event --file ./fixtures/setup_intent.succeeded.json
# 3) Report last hour usage to Stripe (test mode)
poetry run augint sync-usage
# 4) Promote/demote a key (Stripe side)
poetry run augint promote --api-key ABC123
poetry run augint demote --api-key ABC123
Deploy helpers (optional)
poetry run augint deploy --infra ../augint-billing-infra --params template-params.sample.json
poetry run augint delete
Wire the CLI
Add to your pyproject.toml:
[project.scripts]
augint = "augint_billing_lib.cli:cli"
Install: poetry install
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file augint_billing_lib-2.0.0.tar.gz.
File metadata
- Download URL: augint_billing_lib-2.0.0.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c5a59cce2087ed16b76d7b6e09166f736da173eedcba5e08447cff776f3e182
|
|
| MD5 |
8c4106daf338b5ef94637d4427695f2a
|
|
| BLAKE2b-256 |
9dfabd396598d4ac473b572530a0ef35b2db52bb59b984ed619089e96366fb8b
|
Provenance
The following attestation bundles were made for augint_billing_lib-2.0.0.tar.gz:
Publisher:
pipeline.yaml on svange/augint-billing-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
augint_billing_lib-2.0.0.tar.gz -
Subject digest:
9c5a59cce2087ed16b76d7b6e09166f736da173eedcba5e08447cff776f3e182 - Sigstore transparency entry: 412183993
- Sigstore integration time:
-
Permalink:
svange/augint-billing-lib@86b3edd7e1df5b827c373f87b4a8244ed2ee5ce0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/svange
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yaml@86b3edd7e1df5b827c373f87b4a8244ed2ee5ce0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file augint_billing_lib-2.0.0-py3-none-any.whl.
File metadata
- Download URL: augint_billing_lib-2.0.0-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62f79d80ffeca831adfd3032306d1b051db2e8e4f84f7e4d74c57fb38a216c89
|
|
| MD5 |
7b9438668211e321679a8174304ec037
|
|
| BLAKE2b-256 |
ad77cb5b628b7c63b5c0716c83ea4bebb234626ce2c03654e0a9ef91d3bd5c61
|
Provenance
The following attestation bundles were made for augint_billing_lib-2.0.0-py3-none-any.whl:
Publisher:
pipeline.yaml on svange/augint-billing-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
augint_billing_lib-2.0.0-py3-none-any.whl -
Subject digest:
62f79d80ffeca831adfd3032306d1b051db2e8e4f84f7e4d74c57fb38a216c89 - Sigstore transparency entry: 412183999
- Sigstore integration time:
-
Permalink:
svange/augint-billing-lib@86b3edd7e1df5b827c373f87b4a8244ed2ee5ce0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/svange
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yaml@86b3edd7e1df5b827c373f87b4a8244ed2ee5ce0 -
Trigger Event:
push
-
Statement type: