Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thevahidal/another
🕳️ "Another" Python backend framework, for fun.
https://github.com/thevahidal/another
backend framework python
Last synced: 10 days ago
JSON representation
🕳️ "Another" Python backend framework, for fun.
- Host: GitHub
- URL: https://github.com/thevahidal/another
- Owner: thevahidal
- License: mit
- Created: 2023-01-16T15:07:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T17:51:09.000Z (about 2 years ago)
- Last Synced: 2024-12-04T20:50:01.013Z (2 months ago)
- Topics: backend, framework, python
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Another
"Another" Python backend framework, for fun.[![justforfunnoreally.dev badge](https://img.shields.io/badge/justforfunnoreally-dev-9ff)](https://justforfunnoreally.dev)
## Installation
```bash
pip install another
```You also need an ASGI server, such as [Uvicorn](https://github.com/encode/uvicorn) or [Granian](https://github.com/emmett-framework/granian).
```bash
pip install uvicorn
# or
pip install granian
```## Usage
Create a `main.py` file and copy-paste the following snippet into it.
```python
from another import Another, Status, Request, Responseapp = Another()
@app.get("/hello")
def hellow_another(req: Request):
return Response({
"message": "Hello!",
"extra": req.query
}, status=Status.HTTP_200_OK)
```And then run the server:
```bash
uvicorn main:app
```Now open this link [localhost:8000/hello?first_name=Mads&last_name=Mikkelsen](http://localhost:8000/hello?first_name=Mads&last_name=Mikkelsen) in your browser.