Metadata-Version: 2.1
Name: MarsRouter
Version: 0.50
Summary: A batteries included web framework written in python
Author-email: Ahsan Ahmed <ahsan.ahmed3246@gmail.com>
Maintainer-email: Ahsan Ahmed <ahsan.ahmed3246@gmail.com>
License: MIT License
        
        Copyright (c) 2024 MercuryFramework
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/MercuryFramework
Project-URL: Repository, https://github.com/MarsRouter/
Project-URL: Bug Tracker, https://github.com/MercuryFramework/MarsRouter/issues
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# 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
```python3
router = Router()
router.add_route('/user/{username}', user_profile)
result = router.dispatch('/user/john')
# {'controller': user_profile, 'params': {'username': 'john'}}
```
