Skip to content

harshmishra2701/tiny-url

Fabric Generator and Search Utility

A Streamlit template for Recursive Zero repository

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.local,
  • .env, and
  • .streamlit/secrets.toml

Install Dependencies

poetry lock --no-cache --regenerate
poetry install  --with dev

Or manually

poetry install

How to Run

Run Streamlit App

poetry run sample dev

Access: http://localhost:8501

Run FastAPI Server

poetry run sample api
# OR
python src/api/fast_api.py

Access: http://127.0.0.1:5000

🧹 Linting & Code Quality

Pre-commit hooks are enabled. If commits fail, run:

poetry run lint

or run individual

poetry run black .
poetry run flake8 .
poetry run mypy .
poetry run ruff check .

Build & Packaging

Build Package

poetry clean
poetry build

Artifacts in dist/

  • sample-x.y.0-py3-none-any.whl
  • sample-x.y.0.tar.gz

Test Locally

python -m venv .venv-dist
source .venv-dist/bin/activate
# Windows
.venv-dist\Scripts\activate

Install package

pip install dist/*.whl
pip install --upgrade dist/*.whl
# Install extras:
pip install sample

CLI Shortcuts

sample dev → Launch Streamlit UI

sample 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

MIT

References

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE-PYTHON

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from recursivezero/rz-sample