Dates are in YYYY/MM/DD format, time is in America/Chicago (CDT/CST), UTC-0500/-0600. (I've lived in America my whole life, don't @ me, using YYYY/MM/DD is hard enough)
- Developmental -- This stage will end when I finish implementing all the features I want to. Found in src/http_plus_purplelemons_dev. Changes can be tracked here.
- Pre-release -- This stage will end when I finish gathering feedback from the community and adding new features. Changes can be tracked here.
- Release -- This stage will be continuous and offer bug fixes, maybe new features.
2023/07/17-...
Fixes:
- Body is no longer force-decoded with
utf-8inHandler.bodyproperty. Fails silently based onContent-typeheader and defaults toHandler.body: bytes.
Features:
- Using
ThreadingHTTPServernow.
Fixes:
- Streaming event closure bug #52
Added
Event.close()method to end the event stream.
Fixes:
- Really weird code that doesnt serve HTML files from
{ page_dir }properly. - The return of the mysterious AttributeError.
Features:
- Async with
AsyncServer()fromhttp_plus.asyncServer.
Fixes:
- Brython bug where the server will modify html files regardless of whether
Handler.bython==True. - Brython description in
Server()constructor.
Features:
Handleris now incommunications.py, which is where it should have been all along because of how often it refrences and calls the classes defined in that file.
Misc.:
- Appended the suffix
vin front of the recent pre release versions in changelog because I forgot to do that. - Readme now no longer says "Development version <...>", changed to "Pre-release version <...>"
Misc.:
Handlernow lives inhandler.pyin order to cut down the size and clarity of__init__.py. Plans to moveServerto its own file in the future?
Init new release.
2023/01/16-2023/07/17
Features:
- Integration with brython.
- Python script files are sent alongside HTML files as brython scripts.
Features:
- Native GraphQL support! Use
@server.gql(schema:str, endpoint:str).
Fixes:
Serverdecorators now have correct method names in docstrings.
Misc.:
Server.streamis now decorated with@Server._make_method
Features:
- Server module script (
python -m http_plus.server) now has--log <fmt>flag for custom logging. @Server.logcan be used to decorate a method that accepts aHandlerobject and returns a string using the module script log format (e.g.!ip [!date !time]).- Server module script now has pages and error dir flags.
- Server module script can now no longer be imported on accident (via
assert __name__ == "__main__"). Handlerhas.ip,.port,.method,proto, andstatusproperties.- Test shell script!
Fixes:
- Server module script now actually runs. It was never updated from dev19.
Handler.serve_filename()now serves fromHandler.page_dirand not./pages/explicitly.- Server module script now no longer depends on a specific module name, rather now imports necessary methods from the module folder directly.
Misc.:
- Changelog now formatted correctly.
Features:
- Javascript and CSS are now served in http+ style (e.g.
./pages/path/.css).
Fixes:
- Removed a wild debug statement.
Features:
- Both
HandlerandServermethod logic is now condensed to each class's respective@_make_methoddecorator. @server.all()can now exclude methods withexclude:list[str]!
Fixes:
- Bugfix for
Server.listen()debug printout. - Server sent events now work again.
Misc.:
- Removed some wild code in
@server.get()wrapper.
- Backticks (`) have been removed from wrapping parameter names in method docstrings, which prevented code editors from properly displaying type hints/parameter descriptions.
communications.Responseis now compatable with Windows file paths now.- Changelog now has an end date for developmental versions and links to project tracker.
Server.listen()now accepts optional IP and port (the IP will default to127.0.0.1ifdebug:boolisTrue, otherwise it listens on all interfaces via0.0.0.0).- General documentation improvement (especially the
Serverclass). - Removed
Server.base()because it isn't being used anywhere ¯\_(ツ)_/¯
SEND_RESPONSE_CODEandHandler.error()now accept thetraceback:strparameter. An error explanation is already sent, but the traceback can be optionally supplied by settingdebug:bool=Truein theServer()constructor.Handler.respond()now sendsContent-length&Content-type. This should have been fixed in v0.0.15, but was overlooked.
Response.send_file()will serve some file at the given path.Response.prompt_download()will prompt the client to recieve a download.
- Moved TODOs to github issues.
- Updated TODOS.
- Fixed documentation & code formatting and added clarification.
Auth.generate()now acceptstoken_size:intas an argument for adjusting security level. Defaults to 128.- The handler can now serve static files from
./pages/. Handler.respond_file()now usesContent-length... 15 versions into dev... this is something that I should have caught a long time ago...- HTTP/1.0 -> HTTP/1.1!
- Note: i believe http+ will be ready for pre-release within a week. This was a huge update.
- Moved project to Cyberthing.
- Updated TODOs.
@server(path)now works! I'm not sure why i couldn't get it to work at first, but it works now!- Added HTML objects!
- Authorization!. Handles automatically generating tokens and will keep track of data associated with the token.
- Event streams! Use
@http_plus.stream(...,"/path/to/endpoint")and a StreamResponse object is used as the response.
- Updated TODOs.
- Cancelled decorator debug capabilities because it was too much work.
- Route types. Defaults to
str, but specified with@http_plus.<method>(...,"/path/to/endpoint/:var:<type>").
- Updated TODOs.
- Moved
Response.send()toResponse.__call__(). This may prevent devs from accidentally callingResponse.send(). - Moved response code setting in
Response._call__()to be executed before header setting.
- Default error pages now include http code cat!
http.Server()binding now defaults to127.0.0.1:8080in accordance with thehttp_plus.servermodule script defaults.Handler.error()now sends the error traceback to the page.- tests/server.py now has a test for the error page demonstration.
- Updated TODOs... again...
- Added
http_plus.init()which initializes the current directory for HTTP+ @http_plus.<method>()now raisesRouteExistsErrorifpathalready exists for the given method.@http_plus.all()is now more code efficient and looks cleaner pogchamp.- Fixed some comment format errors.
- Added listner logic to all methods (originally only
@http_plus.get()listened). - Fixed
@http_plus.all()because evidently i forgot to check if it was working. - Added more todos.
- Updated the test server to test 0.0.7 features.
- Added changelog
- Aded TODOs to main module file.
- tests/server.py now utilizes full functions for testing.
- Request.params class provides a simple and easy way of accessing parameters passed in from the uri.
# Sample demonstration
@http_plus.get(server,"/example/:id")
def _(req,res):
id_param = req.params.id
return res.send(f"Your id is {id_param}")