Slimhttp

Latest version: v1.0.1rc7

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

Scan your dependencies

Page 2 of 2

1.0beta.002

Some new features:
-----

* Support for large HTTP payloads (thanks to self sacrificing `HTTP_REQUEST`)
* New example using [discord.py](https://discordpy.readthedocs.io/en/latest/) integrated with slimHTTP to form a unison. So showcase the use of slimHTTP together with other libraries mainly using `asyncio`. Altho slimHTTP isn't asyncio in the traditional sense since it's thread safe, it works together with those libraries as well.
* `Events.convert()` which can convert an event INT to a readable string. (Kinda crude but it works, I'm pretty sure heh)
* `HTTP_RESPONSE.build()` now tries to accurately read the `Content-Type` in order to semi-parse the responding data and transform it into `bytes` in a non-intrusive way if possible. (No errorhandling here yet tho..)
* `HTTP_SERVER` now supports `addr = :str` and `port = :int` parameters instead of `config = :dict`, as these variables are needed pre-startup in order to spin up the `socket.bind()` operation and can there for not wait for `http.configuration` handler being set up.

Minor fixes:
------

* `HTTP_REQUEST.request_payload` have no changed name to `HTTP_REQUEST.payload`, same goes for `HTTP_REQUEST.headers`.
* A new event to support partially received content: `Events.CLIENT_DATA_FRAGMENTED`
* Proper (?) termination of HTTP requests, as the server some times forgot to close sockets properly and delete them from the `self.pollobj`.
* Added some more documentation

1.0beta.001

First stable beta release candidate of the minimal web server.
There's some kinks to be sorted out and probably a lot of unknowns, but this release seams to work in a basic sense with a few bug fixes since the alpha release.

1.0alpha

Usage is simple enough that it's time to release a v1.0.
It supports most basic needs, but for sure not all of them.

Tested integration with [spiderWeb](https://github.com/Torxed/spiderWeb) who's name I should probably rename.

Some key milestones:
* Cross platform support *(sounds silly, but the use of `select.epoll()` made this tricky)*
* Works great with WebSockets thanks to [spiderWeb](https://github.com/Torxed/spiderWeb)
* REST lookalike behavior (ignores headers, just checks the path/url)
* Response headers are a bit easier to set with:
py
http.route('/hellowWorld.html')
def api_helloWorld(request):
return slimhttpd.HTTP_RESPONSE(headers={'Content-Type' : 'text/html'},
payload=b'<html><body>Test</body></html>')


Auto-generation of self signed certificates have been prepared, but not yet fully turned on. And there's a bunch of tests that has to be done prior to an actual release party.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.