Skip to main content

No project description provided

Project description

Hypern

Hypern: A Versatile Python and Rust Framework

Hypern is a flexible, open-source framework built on the Robyn, designed to jumpstart your high-performance web development endeavors. By providing a pre-configured structure and essential components, Hypern empowers you to rapidly develop custom web applications that leverage the combined power of Python and Rust.

With Hypern, you can seamlessly integrate asynchronous features and build scalable solutions for RESTful APIs and dynamic web applications. Its intuitive design and robust tooling allow developers to focus on creating high-quality code while maximizing performance. Embrace the synergy of Python and Rust to elevate your web development experience.

🏁 Get started

⚙️ To Develop Locally

  • Setup a virtual environment:
python3 -m venv venv
source venv/bin/activate
  • Install required packages
pip install pre-commit poetry maturin
  • Install development dependencies
poetry install --with dev --with test
  • Install pre-commit git hooks
pre-commit install
  • Build & install Robyn Rust package
maturin develop

🤔 Usage

🏃 Run your code

This using default CLI Robyn, you can see bellow. You will then have access to a server on the localhost:5005,

# main.py
from hypern import Hypern
from hypern.routing import Route, HTTPEndpoint

class MyEndpoint(HTTPEndpoint):
    
    async def get(self, global_dependencies):
        return {"data": "Hello World"}

routing = [
    Route("/hello", MyEndpoint)
]

app = Hypern(routing)

if __name__ == "__main__":
    app.start(host='localhost', port=5005)
$ python3 main.py

To see the usage

usage: main.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev] [--log-level LOG_LEVEL]

options:
  -h, --help                show this help message and exit
  --processes PROCESSES     Choose the number of processes. [Default: 1]
  --workers WORKERS         Choose the number of workers. [Default: 1]
  --dev                     Development mode. It restarts the server based on file changes.
  --log-level LOG_LEVEL     Set the log level name
  --create                  Create a new project template.
  --docs                    Open the Robyn documentation.
  --open-browser            Open the browser on successful start.

Log level can be DEBUG, INFO, WARNING, or ERROR.

You can open swagger UI at path /docs

💡 Features

Comming Soon !

✨ Special thanks

Special thanks to the PyO3 community and Robyn for their amazing libraries 💖

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

hypern-0.1.0.tar.gz (110.1 kB view details)

Uploaded Source

Built Distribution

hypern-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

File details

Details for the file hypern-0.1.0.tar.gz.

File metadata

  • Download URL: hypern-0.1.0.tar.gz
  • Upload date:
  • Size: 110.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for hypern-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bbb54a25ebd2edfe1a0b4eceb711a1ba296de41a285f3a886b07c561147d45e4
MD5 3a1e399b151c8eb46bfc4a440ede3eec
BLAKE2b-256 fe9a2cbcace5e1d50b5b67dc0bb211a61467f6c9bf99b8e373a7bbd321b3a007

See more details on using hashes here.

File details

Details for the file hypern-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9167b8120629aee89aa90fef4441fd17e257fb5247e74f97c6be1bc22d774f91
MD5 3d3aefce6e047267f59acf39bf5f8c7a
BLAKE2b-256 b839e152c8ddf4ceb1b9a7c17c4b7c4b45455d5bf54c9b6d9072bf4634d07d7f

See more details on using hashes here.

Supported by

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