anyserver


Nameanyserver JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/JohnnyBeProgramming/anyserver.py
SummarySimple and generic python web server and utils
upload_time2023-11-14 11:31:44
maintainer
docs_urlNone
authorClub404
requires_python
licenseMIT
keywords simple http server
VCS
bugtrack_url
requirements Jinja2 fastapi uvicorn
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Simple Python Server

Simple and generic python web server, designed with simplicity and extendability in mind.

## Background & motivation

I really like the simplicity and elegance of frameworks like [`FastAPI`](https://fastapi.tiangolo.com/tutorial/first-steps/), [`Flask`](https://flask.palletsprojects.com/en/2.3.x/quickstart/#a-minimal-application), [`Express.js`](https://expressjs.com/en/starter/hello-world.html) and [`Koa.js`](https://koajs.com/#application).

```python
# Typical usage for defining routes
app = FastAPI() # Or some other framework like flask

@app.get("/")
async def root():
    return {"message": "Hello World"}
```

What I don't like, for very simple use cases, is the _boilerplate_ and dependencies.

All of the above frameworks have some requirements and dependencies, meaning its not completely portable to all environments, without the need to download dependencies from the internet.

At its core, this project was designed with the following features in mind:

- Handle `HTTP` routes with a simple `request` - `response` model.
- Support ways to serve static content from a folder (eg: HTML, CSS, JS).
- A zero-dependency `server.py` that just works out of the box as a simple web server.
- Supports multiple response types, with ability to render custom templated responses.

With these basic requirements in place, rapid prototyping is possible with very little overhead.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JohnnyBeProgramming/anyserver.py",
    "name": "anyserver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "simple,http,server",
    "author": "Club404",
    "author_email": "info@club404.io",
    "download_url": "https://files.pythonhosted.org/packages/97/5f/664926e17cae03a711bc8c54431faf7e4e30c6e08b9e4ece301ac905de48/anyserver-0.3.4.tar.gz",
    "platform": null,
    "description": "# Simple Python Server\n\nSimple and generic python web server, designed with simplicity and extendability in mind.\n\n## Background & motivation\n\nI really like the simplicity and elegance of frameworks like [`FastAPI`](https://fastapi.tiangolo.com/tutorial/first-steps/), [`Flask`](https://flask.palletsprojects.com/en/2.3.x/quickstart/#a-minimal-application), [`Express.js`](https://expressjs.com/en/starter/hello-world.html) and [`Koa.js`](https://koajs.com/#application).\n\n```python\n# Typical usage for defining routes\napp = FastAPI() # Or some other framework like flask\n\n@app.get(\"/\")\nasync def root():\n    return {\"message\": \"Hello World\"}\n```\n\nWhat I don't like, for very simple use cases, is the _boilerplate_ and dependencies.\n\nAll of the above frameworks have some requirements and dependencies, meaning its not completely portable to all environments, without the need to download dependencies from the internet.\n\nAt its core, this project was designed with the following features in mind:\n\n- Handle `HTTP` routes with a simple `request` - `response` model.\n- Support ways to serve static content from a folder (eg: HTML, CSS, JS).\n- A zero-dependency `server.py` that just works out of the box as a simple web server.\n- Supports multiple response types, with ability to render custom templated responses.\n\nWith these basic requirements in place, rapid prototyping is possible with very little overhead.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple and generic python web server and utils",
    "version": "0.3.4",
    "project_urls": {
        "Download": "https://github.com/JohnnyBeProgramming/anyserver.py/archive/refs/tags/0.3.4.tar.gz",
        "Homepage": "https://github.com/JohnnyBeProgramming/anyserver.py"
    },
    "split_keywords": [
        "simple",
        "http",
        "server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "975f664926e17cae03a711bc8c54431faf7e4e30c6e08b9e4ece301ac905de48",
                "md5": "918db974001c685c0d739155f4e7804e",
                "sha256": "1d35a0285f5f9361f0918da5c68fef2f5b2f9cbfbc9a4a258bd8a1b3b43247e6"
            },
            "downloads": -1,
            "filename": "anyserver-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "918db974001c685c0d739155f4e7804e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19868,
            "upload_time": "2023-11-14T11:31:44",
            "upload_time_iso_8601": "2023-11-14T11:31:44.718479Z",
            "url": "https://files.pythonhosted.org/packages/97/5f/664926e17cae03a711bc8c54431faf7e4e30c6e08b9e4ece301ac905de48/anyserver-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-14 11:31:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JohnnyBeProgramming",
    "github_project": "anyserver.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.96.0"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    "==",
                    "0.22.0"
                ]
            ]
        }
    ],
    "lcname": "anyserver"
}
        
Elapsed time: 0.14267s