Retic is a framework for Python.
Project description
Retic
Retic is a framework for Python.
Designed to attack the following points in software development:
-
Learning curve: Python has a short learning curve.
-
Hosting: Quick and easy configuration on the servers.
-
Artificial intelligence: The most important libraries are written in Python.
Install a Python rest api framework
Install and update using Pip:
# Get the latest stable release of Retic
pip install -U retic
Simple rest api example in Python
# app.py
"""Main app"""
# Retic
from retic import Router, App as app
"""Define Router instance"""
router = Router()
"""Define paths"""
router \
.get("/", lambda req, res, next: res.ok({"msg": "Hello world! - HTTP GET"})) \
.post("/", lambda req, res, next: res.ok({"msg": "Hello world! - HTTP POST"})) \
.put("/", lambda req, res, next: res.send({"msg": "Hello world! - HTTP PUT"})) \
.delete("/", lambda req, res: res.send({"msg": "Hello world! - HTTP DELETE"}))
"""Import router to App"""
app.use(router)
"""Create web server"""
app.listen(
hostname="localhost",
port=1801
)
Want to help?
Do you want to send an error, contribute some code or improve the documentation? Great, you can do it! Read our guidelines to contribute and then review one of our issues in the hotlist: community-help.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
retic-0.1.2.tar.gz
(14.9 kB
view details)
File details
Details for the file retic-0.1.2.tar.gz
.
File metadata
- Download URL: retic-0.1.2.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80d88106fa064a469ce0ffe21893d4484f1ed7be55dd9aba2e89de87b2692903 |
|
MD5 | d0862ba2bdbcc8a31458fe88049e0fdc |
|
BLAKE2b-256 | 2b8002288102a697f76e33ac33dd933875317f73afa485b4d6cb33bdd8fbd84b |