Skip to main content

quantready

A CLI to quickly launch data-driven and API-first businesses - using the modern python stack

✅✅✅ QuantReady Stack - Templates ✨

quantready

CLI for creating and configuring projects and using the quantready-* templates

quantready-base

build and publish python libraries and docker images

  • ✔️ poetry for dependency management
  • ✔️ pre-commit hooks for code formatting, linting, and testing
  • ✔️ unittest for testing
  • ✔️ gitleaks for secrets scanning
  • ✔️ github actions for CI/CD
  • ✔️ docker for building containers
  • ✔️ twine for publishing to pypi or private repositories
  • 🔲 gcloud for publishing to private repositories

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

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

📦 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 <your-repo>

pip install typer
python configure.py

💻 Development

Install dependencies

Requires poetry and python3.10 or higher

Install Poetry from https://github.com/python-poetry/install.python-poetry.org#python-poetry-installer

  curl -sSL https://install.python-poetry.org | python3 -
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
poetry install

# Install pre-commit hooks
poetry run 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 creation of a new release

Configuration Set a GitHub Repository Secret PYPI_API_TOKEN equal to an API key generated from your PYPI account:

  1. Generate Token here: https://pypi.org/manage/account/token/
  2. Set it as a Repository Secret here: https://github.com///settings/secrets/actions

Create a new Release

  1. Goto https://github.com/closedloop-technologies/quantready/releases/new

or

  1. Goto https://github.com///releases
  2. Click "Draft a new Release"

This will trigger the GitHub Action to deploy your new release to PyPi

Push Docker image

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

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

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

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

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

Release files for quantready 0.2.0

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 0.2.0
File Size Uploaded
quantready-0.2.0.tar.gz 9.2 kB Details

Built distribution (wheel)

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

Total release size: 18.7 kB

Release files / quantready-0.2.0.tar.gz

Download URL quantready-0.2.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08d15fb209217bd84221e06c17c5d2ada510dfd493e5117af28f64ffed444225
BLAKE2b-256 checksum
How to use checksums
b9139a82caea3c7aa1b2930342339d9db5e2262a35ad6efac37c14f753903e7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / quantready-0.2.0-py3-none-any.whl

Download URL quantready-0.2.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
218753cf69c1be5b5185c4d7f06f71fb858c13d040dbc92fbdc2274e929beabd
BLAKE2b-256 checksum
How to use checksums
c1f219e7b9f566b726367e0aae93154ba16406f0c754c8a3bc2b58bbafec8ed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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