Skip to main content

quantready-base

Publish public or private python libraries - using the modern python stack

✨ Features

Clean Code:

  • ✔️ poetry for dependency management
  • ✔️ pre-commit hooks for code formatting, linting, and testing
  • ✔️ unittest for testing
  • ✔️ gitleaks for secrets scanning

Deployment:

  • ✔️ github actions for CI/CD
  • ✔️ docker for building containers
  • ✔️ twine for publishing to pypi or private repositories
  • 🔲 gcloud for publishing to private repositories

📦 Installation

There are two ways to install:

1. Install using quantready cli

It is best to install as a template using gh

pip install quantready

# Create a new repo
quantready create <your-repo> --template quantready/quantready-base

2. Install as a template

To install and configure yourself using gh

gh template copy quantready/quantready-base <your-repo>

pip install typer
python configure.py

💻 Development

Install dependencies

# Create a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
poetry install

# Install pre-commit hooks
pre-commit install --install-hooks

# Create a .env file and modify it's contents
cp .env.example .env

🚀 Deployment

The best way is to use quantready cli

# Configure the project and cloud providers
quantready configure

This will create a .quantready file in the root of the project.

GitHub Actions: On push to main

Github actions are configured to run on push to main. It will read the config from .quantready file and publish the library to pypi or private repository as well as build the docker image and push it to docker hub or gcr.

Push Docker image

# Build the image
docker build -t quantready/quantready-base .

# Run the image
docker run -it --rm quantready/quantready-base

# Push the image to docker hub
docker push quantready/quantready-base

# Push the image to gcr
docker tag quantready/quantready-base gcr.io/<your-project>/quantready-base

Publish to pypi

# Build the package
poetry build
poetry run twine upload dist/*

Get PYPI_API_TOKEN from https://pypi.org/manage/account/token/ And set it as a github secret https://github.com///settings/secrets/actions

Publish to private repository

# Build the package
poetry build
poetry run twine upload --repository-url https://pypi.yourdomain.com dist/*

📝 License

This project is licensed under the terms of the MIT license.

📚 Resources

✅✅✅ QuantReady Stack - Templates

  • quantready
    • CLI for creating and configuring projects and using the quantready-* templates
  • quantready-base
    • This template - build and publish python libraries and docker images
  • quantready-api - A template to build and deploy fastapi applications
    • authentication - api key or oauth
    • authorization - RBAC via OSO
    • rate limiting - via redis
    • job-queues to support long-running tasks
    • workers
    • caching
    • github actions to deploy to gcloud
    • all other features of quantready-base
  • quantready-vendor - A template to sell and meter access to your APIs. Supports time-based and usage-based pricing.
    • supports free and paid endpoints
    • billing per API call or per time-period
    • stripe-cli integration for managing products and billing
    • pricing-tables, account management and checkout
    • usage tracking api
    • all other features of quantready-api
  • [quantready-chat]
    • A template to build and deploy chatbots
    • Supports Websockets
    • Slack Integration
    • all other features of quantready-vendor

Metadata

Release files for quantready-base 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantready-base 0.2.2
File Size Uploaded Provenance Actions
quantready_base-0.2.2.tar.gz 4.4 kB Without provenance Details for quantready_base-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantready-base 0.2.2
File Interpreter ABI Platform Actions
quantready_base-0.2.2-py3-none-any.whl Python 3 none any Details for quantready_base-0.2.2-py3-none-any.whl

Total release size: 10.0 kB

Release files / quantready_base-0.2.2.tar.gz

Download URL quantready_base-0.2.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df08008b82cdd87ccc3c79a5c3131b1abd1a2716a922103a8fed62077d096630
BLAKE2b-256 checksum
How to use checksums
fcda26f3eafb2609fa0036eb38976d45665854c4a4a87ed79f8919822d4c914b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / quantready_base-0.2.2-py3-none-any.whl

Download URL quantready_base-0.2.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32d5d08363f22010484a9affbb9056dabbb26373e78a127f701939062e038964
BLAKE2b-256 checksum
How to use checksums
c99104a3056781432fa0f39008657cea7e7d0886f479d25ab28fc0b1502084af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for quantready-base 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page