Skip to main content

A Fast Async Python backend with a Rust runtime.

Project description

Hypern

Hypern: A Versatile Python and Rust Framework

Hypern is a flexible, open-source framework built on the Rust, 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 Rust package
maturin develop

🤔 Usage

🏃 Run your code

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, request):
        return {"data": "Hello World"}

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

app = Hypern(routing)

if __name__ == "__main__":
    app.start()
$ python3 main.py

You can open swagger UI at path /docs

CLI

- host (str): The host address to bind to. Defaults to '127.0.0.1'.
- port (int): The port number to bind to. Defaults to 5000.
- processes (int): The number of processes to use. Defaults to 1.
- workers (int): The number of worker threads to use. Defaults to 1.
- max_blocking_threads (int): The maximum number of blocking threads. Defaults to 32.
- reload (bool): If True, the server will restart on file changes.
- auto_workers (bool): If True, sets the number of workers and max-blocking-threads automatically.

💡 Features

⚡ High Performance

  • Rust-powered core with Python flexibility
  • Multi-process architecture for optimal CPU utilization
  • Async/await support for non-blocking operations
  • Built on top of production-ready Rust language

🛠 Development Experience

  • Type hints and IDE support
  • Built-in Swagger/OpenAPI documentation
  • Hot reload during development
  • Comprehensive error handling and logging

🔌 Integration & Extensions

  • Easy dependency injection
  • Middleware support (before/after request hooks)
  • WebSocket support
  • Background task scheduling
  • File upload handling

🔒 Security

  • Built-in authentication/authorization (Comming soon)
  • CORS configuration
  • Rate limiting
  • Request validation

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

hypern-0.3.8-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

hypern-0.3.8-cp312-cp312-win32.whl (3.3 MB view details)

Uploaded CPython 3.12Windows x86

hypern-0.3.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hypern-0.3.8-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.12+ i686

hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (7.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

hypern-0.3.8-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

hypern-0.3.8-cp311-cp311-win32.whl (3.3 MB view details)

Uploaded CPython 3.11Windows x86

hypern-0.3.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hypern-0.3.8-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.12+ i686

hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (7.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

hypern-0.3.8-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

hypern-0.3.8-cp310-cp310-win32.whl (3.3 MB view details)

Uploaded CPython 3.10Windows x86

hypern-0.3.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

hypern-0.3.8-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.12+ i686

hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (7.0 MB view details)

Uploaded CPython 3.10macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file hypern-0.3.8-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: hypern-0.3.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eec03e2ccb1e1cdf72e50b03425006b2c04c76785a7fb218ce55bbb5a0579ea4
MD5 404464560b5656b5c59df10e84c9134c
BLAKE2b-256 d567da52797c50f5768dfc9240146d620f2c184cdc33787e341c428660988809

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp312-cp312-win32.whl.

File metadata

  • Download URL: hypern-0.3.8-cp312-cp312-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 117e5f938e543d5eb7666e44acf9fa4f3b626563cdef73f5e77e19fb329e8405
MD5 d2e90f462f7831e7ebaf9af7d54e161a
BLAKE2b-256 f4b03c367ecb24867c19280f289f8fbf3fdc5f6d9716342b80314a33b6d1c265

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b18a5760cd2de317833a629c2b4efc91c9e4971b11b75e60d618333330812940
MD5 a70c9a77b8b0d703dc49dc761d599d7d
BLAKE2b-256 debc6a4dd8cf8014954b35292f3d8da99d35ea989a4b8a170066bd102ae7de6d

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5ec231906c27a914984ecfc5276d15797cf8d60b621d32e770d45e8775308125
MD5 54f314b2503327d3f2f3b9a09e46eeb3
BLAKE2b-256 6f0a7b639b0bbf5c9e4eec10ad2d2c4844386d0934af67959f87bc2f8d1a1d59

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d897632f4e2ea6079174e05833d11730e1875b0215995f2d4161f29559341d77
MD5 89302669c40d0a175a91ea43b5f11ed3
BLAKE2b-256 fa9218ea72864d2afcfd52a2e09d7c11b66e9b2e1a06150d1c2139a74ec27642

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a992cafa3244f2126975b534d066f42b6eac02323e522d69e36fd40c8f9eda41
MD5 4770e6810d3dd5f83c1d63a7df0e3994
BLAKE2b-256 544575af6cd40d527b412c7dc426f31963ad4a458e4fc64085a79920348a697b

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: hypern-0.3.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 989170f50d1c08d10e7dccdf9d4389afece30f8dcf160cffaacd92e2a782a26c
MD5 09cf800f65378a385aee03f5159ba533
BLAKE2b-256 2b5b0186d4c8162fd86292028a6531fd7c3e618443e5a067d31d47ffab7cd2dd

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-win32.whl.

File metadata

  • Download URL: hypern-0.3.8-cp311-cp311-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 294af6410c8c27845023723f2f2060022d7172c3f48dfa4cde64a618ac7e3934
MD5 0b97a106bd459a08fa62e0c296f97f81
BLAKE2b-256 f318feb178a4364278d777a7790cf17578d3d80c6ca34d74c7f30ec8b983f8f2

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c4d6d294baaed4aa963f4a9e95f9000450149849feed0ecc0f5f6026b06b5789
MD5 5ab0fd1c7a8f466dedc947f6cf26d6d7
BLAKE2b-256 97b6dc82540d36bf22fb26465c0f82a2dffb52ac840b2b59c05e9862edc47b88

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 8d4153b96ee2575452355201212b90b232e54a81386603d572acfbfbea222628
MD5 7460d199995b5a970dc08864e7c78e23
BLAKE2b-256 57f5efc3f14b556fbf45c31df23acd21c67db8806a645436689be9900acf7ff7

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d68c7be96ae36a55be702725ef7dfaa19e19a344d56870ed60c77d5e2e55e035
MD5 09a080b93129c97a5ae84f1c282148bb
BLAKE2b-256 9c931d53873934b385f3d75fa2e51a2b6714e2fde9f158b4506408475d61738b

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 53641a9a0f12413f0b6aa41b192fed6db8ac37cd0055a28ef12fb4d1783cf3f1
MD5 f524ab2694898d901bce118efa7d9727
BLAKE2b-256 caca8ae425ec3256fccc5db01148e28b728796c35916dcbad81e8cc8fc92d1c6

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: hypern-0.3.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c2f42329a21d47d4f59d052800ddfd5af9e86a15b13dfffc1499e1ab787c2d03
MD5 e517f5df1a8fe4db253c6e78d0a5b4a7
BLAKE2b-256 fba3dd3dffb6f1df28e30fe1a31b3c5d566d3d6181079d8f15a8c755bd4e7e8d

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-win32.whl.

File metadata

  • Download URL: hypern-0.3.8-cp310-cp310-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hypern-0.3.8-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 ee380da7223c8b5e1c0fa50cfc60cad54b9327a79ad5c0d9c442a36ebcaf6ea8
MD5 489acb03f2fecac1bda2c0352afdde5b
BLAKE2b-256 8b23acef59cd93a2b945637ab4c654556441e331072656de2dfaf93f58bc2aea

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f4be119f6246995a6803ea6f2a52f7b8e374621240eda32368665d14a5e9a97
MD5 266fdd7217628a65ad95c1721fc41f05
BLAKE2b-256 c930683e77c83cff10e6cf1adafa08d2b8a4f582faf362bc505b1876b25b451a

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 cace18e86b1c0659345b86db9b5ffef13e349498c6ab67433c4f326e317fee4a
MD5 f73356459d6af761dcc810d3c1defe62
BLAKE2b-256 6231cfb0c54b81898a80b8ae460dde2d7e7be7d3890ade5539ce2be600132766

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8e85ba9c4a73ee5ff9f77bbe915b88d2331a3a957623faadd62f7b04489665fc
MD5 e008e03d975d2ece9f33e1eed799aae7
BLAKE2b-256 7b3bee1c3908cb891da98594657e1dfc8d9d83129e67d0184af0921e801ae713

See more details on using hashes here.

File details

Details for the file hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for hypern-0.3.8-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e862bf092d805eb0678fee363c258098a8c0a8f34e47416569f545770a51479f
MD5 2d00e054d71e7e244469e8d4dbce92ec
BLAKE2b-256 c33fca2d41f5c681ffabd4d52fe500f3f945585c60c68d9bdbd96d185be46db2

See more details on using hashes here.

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