Baguette

Latest version: v0.3.1

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.0.3

I changed quite some things in the module over the last few days and I’m happy to announce that the docs have improved a lot, despite still needing more docstrings in the code itself. **The biggest change is that the ``app.endpoint`` decorator was renamed to ``app.route``** as it made more sense with the implementation of a Router class.

Here's a new basic example:
py
from baguette import Baguette

app = Baguette()

app.route("/")
async def index(request):
return "<h1>Hello world</h1>"

And here's another example using class based views:
py
from baguette import Baguette, View

app = Baguette()

app.route("/home")
class Home(View):
home_text = "<h1>Home</h1>"

async def get(self, request):
return self.home_text

async def post(self, request):
self.home_text = await request.body()
return self.home_text

As you can see it’s still pretty straight-forward and easy to use.

Links
PyPi: https://pypi.org/project/baguette/
Docs: https://baguette.readthedocs.io/
Discord support server: https://discord.gg/PGC3eAznJ6

0.0.2

This is the first working release of the module. The docs aren't ready yet and the code is poorly documented but it should be pretty easy to use.
Here's a basic example:
py
from baguette import Baguette

app = Baguette()

app.endpoint("/")
async def index(request):
return "<h1>Hello world</h1>"

And here's another example using class based views:
py
from baguette import Baguette, View

app = Baguette()

app.endpoint("/home")
class Home(View):
home_text = "<h1>Home</h1>"

async def get(self, request):
return self.home_text

async def post(self, request):
self.home_text = await request.body()
return self.home_text

As you can see its straight-forward.

Links
PyPi: https://pypi.org/project/baguette/
Docs: https://baguette.readthedocs.io/
Discord support server: https://discord.gg/PGC3eAznJ6

0.0.1

Test release for PyPi

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.