Billing service library for API usage tracking and Stripe integration.
Project description
Augint Billing Library
Billing service library for API usage tracking, tiered pricing calculations, and Stripe integration.
Overview
This library provides the core business logic for:
- Tracking API usage per customer
- Calculating charges with tiered pricing models
- Managing Stripe customers and payments
- Processing webhooks from Stripe
- Generating usage and billing reports
📊 Live Dashboards
| 📖 Documentation | 🧪 Unit Tests | 🔬 Integration Tests | 📊 Coverage | ⚡ Benchmarks | 🔒 Security | ⚖️ Compliance |
|---|
🔑 Key Development Characteristics
| Characteristic | Details |
|---|---|
| Merge Strategy | Configurable (see .env) |
| Deployment Model | Tag-based to PyPI |
| Environments | Local → PyPI |
| Preview Environments | N/A (library) |
| Pipeline Features | Semantic release, Auto-publish to PyPI |
| Special Considerations | 90% coverage requirement, Mutation testing |
Project Structure
augint-billing-lib-library/
├── src/
│ └── augint_billing_lib/ # Core library code (to be implemented)
├── tests/ # Test suite (to be implemented)
├── examples/ # Original template code for reference
├── pyproject.toml # Project dependencies and configuration
├── Makefile # Development commands
└── README.md # This file
Development Setup
# Install dependencies
make install
# Run tests
make test
# Check code quality
make lint
make type-check
# Generate documentation
make docs
Implementation Status
This is a minimal template ready for implementation. The following components need to be built:
Library Exports (from planning spec)
- BillingService - Main service class
- UsageCollector - Track API usage
- PricingCalculator - Apply tiered pricing
- StripeManager - Stripe operations
- WebhookProcessor - Process Stripe webhooks
- ReportGenerator - Generate reports
- Data models (Customer, UsageRecord, BillingPeriod, etc.)
Key Features Removed (Minimal Version)
- ✅ Feature flags removed
- ✅ Telemetry/Sentry removed
- ✅ Mutation testing removed
- ✅ Complex CLI structures removed
Dependencies
Core dependencies:
- click - CLI framework
- boto3 - AWS SDK (to be added)
- stripe - Stripe SDK (to be added)
- pydantic - Data validation (to be added)
Testing
The project uses pytest with pragmatic coverage targets:
- Library code: 70% coverage target
- Focus on core business logic
- Integration tests for AWS/Stripe interactions
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-1.1.2.tar.gz.
File metadata
- Download URL: augint_billing_lib-1.1.2.tar.gz
- Upload date:
- Size: 77.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03491476f778caffd3bd46762245c3345b2cef75af8b665aaf92c85428fe9da0
|
|
| MD5 |
e23914ff55af908e03b501b338fea0ab
|
|
| BLAKE2b-256 |
19e9cf750e999909769730159c8455da8a64c3c2a0ec0247ed0c2b2551c82a39
|
Provenance
The following attestation bundles were made for augint_billing_lib-1.1.2.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-1.1.2.tar.gz -
Subject digest:
03491476f778caffd3bd46762245c3345b2cef75af8b665aaf92c85428fe9da0 - Sigstore transparency entry: 383881207
- Sigstore integration time:
-
Permalink:
svange/augint-billing-lib@b368ed4aa54d087168860ca15f77e5f47f0d0537 -
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@b368ed4aa54d087168860ca15f77e5f47f0d0537 -
Trigger Event:
push
-
Statement type:
File details
Details for the file augint_billing_lib-1.1.2-py3-none-any.whl.
File metadata
- Download URL: augint_billing_lib-1.1.2-py3-none-any.whl
- Upload date:
- Size: 82.6 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 |
6b678598b941dde312c536dbb2e743980946cef2f57493b5d167e25b0a996937
|
|
| MD5 |
9252d48c41fd0a907d6807ba8ef9458a
|
|
| BLAKE2b-256 |
27d5872bb6e6c19202cf4dd98a13db845171af2290058d4bf802957d684d6a73
|
Provenance
The following attestation bundles were made for augint_billing_lib-1.1.2-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-1.1.2-py3-none-any.whl -
Subject digest:
6b678598b941dde312c536dbb2e743980946cef2f57493b5d167e25b0a996937 - Sigstore transparency entry: 383881217
- Sigstore integration time:
-
Permalink:
svange/augint-billing-lib@b368ed4aa54d087168860ca15f77e5f47f0d0537 -
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@b368ed4aa54d087168860ca15f77e5f47f0d0537 -
Trigger Event:
push
-
Statement type: