Skip to main content

A batteries included web framework written in python

Project description

MarsRouter

MarsRouter is a lightweight and flexible dynamic routing system for Python. It allows you to define URL patterns with dynamic segments and map them to controller functions. The routing system matches incoming URLs to the defined patterns, extracts dynamic parameters, and provides a simple interface to handle requests based on these parameters.

Features

  • Dynamic URL pattern matching
  • Simple function-based controllers
  • Flexible parameter extraction
  • Easy integration into existing Python projects

Usage

router = Router()
router.add_route('/user/{username}', user_profile)
result = router.dispatch('/user/john')
# {'controller': user_profile, 'params': {'username': 'john'}}

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

marsrouter-0.50.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

MarsRouter-0.50-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file marsrouter-0.50.tar.gz.

File metadata

  • Download URL: marsrouter-0.50.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for marsrouter-0.50.tar.gz
Algorithm Hash digest
SHA256 83637c9f71d163c763f3c5514af54d2b93f9e8cacc3246410a3c9f923b2dc5a7
MD5 aa6eaf6888bba2908700fbc41822aa4f
BLAKE2b-256 37b153d21ac561d6ea5e9ab9cc80baafa2d9bb0db89e532ed698fd38bfb8a015

See more details on using hashes here.

File details

Details for the file MarsRouter-0.50-py3-none-any.whl.

File metadata

  • Download URL: MarsRouter-0.50-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for MarsRouter-0.50-py3-none-any.whl
Algorithm Hash digest
SHA256 32ff025f52e52ca78d158999c93f8f71a3d62cbcc5d5cf320c9b3eb75d30cfd6
MD5 195d2242bd9340edd1b7049dfe14e6d4
BLAKE2b-256 d016ed44c79dc3c6de33e64b5c62c96598a929a18811d96dd209108f4ef40079

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