Skip to main content

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

MIT

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

retic-0.1.2.tar.gz (14.9 kB view hashes)

Uploaded Source

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