Skip to main content

Ushka is a minimal, experimental Python micro-framework for hobbyists and solo developers. Its goal is to enable rapid API development with zero boilerplate by using file-based routing.

Project description

🐱 Ushka Framework

PyPI Version Python Versions License Code Style: Black

Make Python Cute Again. > The most beautiful, agile, and visually striking web framework you'll use in your terminal.


👋 Hi, I'm Ushka!

Tired of frameworks that give you a white screen of death and boring black-and-white logs? Ushka was born from the idea that backend coding doesn't have to be ugly or bureaucratic.

I turn your filesystem into an API automatically, I configure the server myself, and if something goes wrong, I show you a Cyberpunk error page so pretty you'll want to leave the bug there.

✨ Why use me?

  • 🎨 Visual DX: My terminal logs are colorful (Neon/Dark theme), organized, and informative.
  • 📂 File-Based Routing: Stop manually importing controllers. Create a file in the routes/ folder and the magic happens.
  • 🧠 Zero Config: The first time you run me, I generate ushka.toml for you. No boilerplate.
  • 🛡️ Panic Mode: My interactive error page lets you copy the traceback with one click and inspect local variables.

✅ What's ready? (Features)

Ushka is evolving fast. Here is what is running smoothly in the current version:

  • Auto-Discovery: Automatic route mapping based on the routes/ folder.
  • Smart Response: Return dict (becomes JSON), str (becomes HTML), or pure Response objects.
  • Jinja2 Templates: Native support with a simple render() function.
  • Ushka Panic: Stylized error handling (500/404) with dark theme, interactive stacktrace, and code highlighting.
  • Auto Config: Automatic generation and reading of ushka.toml.
  • Rich Logging: Request logs colored by status code (Success=Green, Error=Red, Redirect=Blue).
  • Dependency Injection: Inject request and URL parameters (id, slug) just by declaring them in the function.
  • Core ASGI: Based on Uvicorn, fully async.

📦 Installation

pip install ushka

🚀 How to use (No fluff)

Ushka follows the "Convention over Configuration" philosophy.

1. The Structure

Create a folder. That's it. I expect something like this:

my_project/
├── app.py              # Where it all starts
├── ushka.toml          # I create this for you automatically!
├── templates/          # Your HTMLs
│   └── hello.html
└── routes/             # Your Routes (The Magic)
    ├── index.py        # Route: /
    └── users/
        └── [id].py     # Route: /users/<id>

2. Create a Route (routes/index.py)

No complex decorators on top of the function. The function name is the HTTP Method.

from ushka.template import render

# Responds to GET /
async def get():
    return render("hello.html", {"name": "Dev"})

3. Create the App (app.py)

from ushka import Ushka

app = Ushka()

if __name__ == "__main__":
    # I read the host and port from ushka.toml automatically
    app.run()

4. Run it!

python app.py

Look at your terminal. Appreciate the banner. See the route table. Now go to http://127.0.0.1:8000.


🖼️ Visual Showcase

The "Ushka Panic" (Debug Page)

We believe that making mistakes is part of the process, but debugging should be easy.

  • Inspect local variables.
  • Copy the error with one click to paste into StackOverflow/ChatGPT.
  • Dark theme so you don't burn your eyes at 3 AM.

(Imagine a beautiful screenshot here)


🗺️ Roadmap (What's coming next)

We are currently in Alpha, but we dream big. The plan for World Domination (v1.0):

  • Ushka CLI: ushka new commands to scaffold projects and ushka deploy for auto-HTTPS configuration (Caddy).
  • Multipart Streaming: Support for large file uploads without eating up RAM.
  • Middlewares: Robust system to intercept requests.
  • Cookies & Sessions: Native state management.
  • Subapps (Blueprints): For when your project gets huge.
  • Auth Embedded: Optional built-in login system.

🤝 Contributing

Ushka is open-source and made with love. Spotted a bug? Want to request a feature? Open an Issue!

  • License: MIT
  • Author: Kleber Code

Made with ❤️, Python, and lots of caffeine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ushka-0.1.3.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ushka-0.1.3-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file ushka-0.1.3.tar.gz.

File metadata

  • Download URL: ushka-0.1.3.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ushka-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3546dcd909a55e4a0a33a8b3f9616f9beacfa4753dc59f1ed13f772cb678219f
MD5 d63eb22a155671671cb66ae2cba96209
BLAKE2b-256 3e668ff637326297bbaf0000ba9b15ca305640623a86fae8b139ead623780111

See more details on using hashes here.

Provenance

The following attestation bundles were made for ushka-0.1.3.tar.gz:

Publisher: python-publish.yml on kleber-code/ushka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ushka-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ushka-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ushka-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12fb3ab072a31396e209bc7e2f45a589410afac39126bf4db8f05cc447ddf807
MD5 5f1579a93d1483ebaad250a459e4ed13
BLAKE2b-256 12ce7ef360984693db345838b7fb1867e558acdbb7ef68c4697b4a6db889bbff

See more details on using hashes here.

Provenance

The following attestation bundles were made for ushka-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on kleber-code/ushka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page