dullbananas
/
phosphorus
Archived
1
0
Fork 0
Basic regex-based WSGI framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Dull Bananas b870213352 Add unit test 3 years ago
phosphorus Improve efficiency 3 years ago
.gitignore Initial commit 3 years ago
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 3 years ago
LICENSE Initial commit 3 years ago
README.md Update README.md 3 years ago
setup.py Implement stuff 3 years ago
test_phosphorus.py Add unit test 3 years ago

README.md

Phosphorus

Phosphorus is a simple WSGI framework that uses regular expressions for URL endpoints. Here is an example of a simple application implemented in Phosphorus:

import phosphorus

app = phosphorus.App()

@app.add_endpoint('/(.)')
def single_char(match, environ):
    content = f'<html><head></head><body>Character: {match.group(1)}<br/>Environ: {environ}</body></html>'
    return phosphorus.Response(content)