A python boilerplate for fastapi and streamlit projects.
Project description
RZ-Sample
poetry + streamlit + fast api boilerplate for python development.
Installation Guide
Prerequisites
- Python ≥ 3.11
- Poetry ≥ 2.2.1
- Streamlit ≥ 1.49.1
Getting Started
Poetry Setup
curl -sSL https://install.python-poetry.org | python3 -
# OR
pip install poetry>=2.2.1
Virtual Environment Configuration
poetry config virtualenvs.path /your/desired/path
Ensure below files are configured (create if not exist) properly to run the project;
.env.development.env.production
Install Dependencies
poetry lock --no-cache --regenerate
poetry install --all-extras --with dev
Or manually
make install
How to Run
Configure ENVIRONMENT
setup .env.development and .env.production in project root
# for local configuration(linux)
export ENV=development
# for production(linux)
export ENV=production
Run Streamlit App
make dev
# OR with custom port
poetry run sample dev --port 8051
then open UI on : http://localhost:8501
to run on different port use --port option
poetry run sample dev --port 1234
Run FastAPI Server
make api
# OR with custom port
poetry run sample api --port 5000
Access: http://127.0.0.1:5000
🧹 Linting & Code Quality
Pre-commit hooks are enabled. If commits fail, run:
make lint
or run individual
poetry run black .
poetry run flake8 .
poetry run mypy .
poetry run ruff check .
CLI Shortcuts
make dev → Launch Streamlit UI
make api → Launch FastAPI
current version will be printed on start of above commands.
Troubleshooting
sometimes there might be chances that virtual environment get corrupted then delete the old virtual environment and start afresh.
poetry env info
# this will provide virtual environment name
poetry env remove <environment-full-name>
License
References
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 rz_sample-2.0.2.tar.gz.
File metadata
- Download URL: rz_sample-2.0.2.tar.gz
- Upload date:
- Size: 111.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd7aec2e61ac9d6877c8d77e315aa8e0648e67b384b345c1d8601be274099396
|
|
| MD5 |
da99d114055f280f95a1505571ad9ddf
|
|
| BLAKE2b-256 |
21f47e2cc4089735faea064874fe42edc1906b2e07303b26f5b58ff2ceede46d
|
Provenance
The following attestation bundles were made for rz_sample-2.0.2.tar.gz:
Publisher:
publish.yml on recursivezero/rz-sample
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rz_sample-2.0.2.tar.gz -
Subject digest:
fd7aec2e61ac9d6877c8d77e315aa8e0648e67b384b345c1d8601be274099396 - Sigstore transparency entry: 1181440877
- Sigstore integration time:
-
Permalink:
recursivezero/rz-sample@3302865ffcbb98450ea23756229d64d33abf5486 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/recursivezero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3302865ffcbb98450ea23756229d64d33abf5486 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rz_sample-2.0.2-py3-none-any.whl.
File metadata
- Download URL: rz_sample-2.0.2-py3-none-any.whl
- Upload date:
- Size: 114.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
239e406956dc046c594d850a399ab272b3e7435c57e7c0146063bece5d13944d
|
|
| MD5 |
0b91da6457709efdb0132593dfaab9b8
|
|
| BLAKE2b-256 |
c1c163942fa9d77c4660d593e7402f149c4f554ac12f1fa70e179c1cba51fba4
|
Provenance
The following attestation bundles were made for rz_sample-2.0.2-py3-none-any.whl:
Publisher:
publish.yml on recursivezero/rz-sample
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rz_sample-2.0.2-py3-none-any.whl -
Subject digest:
239e406956dc046c594d850a399ab272b3e7435c57e7c0146063bece5d13944d - Sigstore transparency entry: 1181440882
- Sigstore integration time:
-
Permalink:
recursivezero/rz-sample@3302865ffcbb98450ea23756229d64d33abf5486 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/recursivezero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3302865ffcbb98450ea23756229d64d33abf5486 -
Trigger Event:
push
-
Statement type: