fastapi-webserver


Namefastapi-webserver JSON
Version 0.3.4 PyPI version JSON
download
home_pageNone
SummaryA simple FastAPI webserver with a bunch of useful resources.
upload_time2025-02-22 20:26:05
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
license# 🏳️‍🌈 Opinionated Queer License v1.1 © Copyright [Andrea Vos](https://avris.it), [Kolektyw „Rada Języka Neutralnego”](https://zaimki.pl/kolektyw-rjn) <div class="table-responsive"> <table class="table"> <thead> <tr class="text-center"> <th>You can</th> <th>You cannot</th> <th>You must</th> </tr> </thead> <tbody> <tr> <td> <ul> <li>Use privately</li> <li>Use commercially</li> <li>Modify</li> <li>Adapt</li> <li>Distribute</li> <li>Sublicense</li> <li>Use a patent</li> <li>Add a warranty</li> </ul> </td> <td> <ul> <li>Hold the Licensor liable</li> <li>Be a big corporation</li> <li>Be law enforcement or military</li> <li>Use for bigoted purposes</li> <li>Use for violent purposes</li> <li>Just blatantly resell it<br/><small>(even if laundered through machine learning)</small></li> </ul> </td> <td> <ul> <li>Give credit</li> <li>Indicate changes made</li> <li>Include license or a link</li> </ul> </td> </tr> </tbody> </table > </div> ## Permissions The creators of this Work (“The Licensor”) grant permission to any person, group or legal entity that doesn't violate the prohibitions below (“The User”), to do everything with this Work that would otherwise infringe their copyright or any patent claims, subject to the following conditions: ## Obligations The User must give appropriate credit to the Licensor, provide a copy of this license or a (clickable, if the medium allows) link to [oql.avris.it/license/v1.1](https://oql.avris.it/license/v1.1), and indicate whether and what kind of changes were made. The User may do so in any reasonable manner, but not in any way that suggests the Licensor endorses the User or their use. ## Prohibitions No one may use this Work for prejudiced or bigoted purposes, including but not limited to: racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny. No one may use this Work to inflict or facilitate violence or abuse of human rights as defined in the [Universal Declaration of Human Rights](https://www.un.org/en/about-us/universal-declaration-of-human-rights). No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors may use the Work for any reason. This also applies to any individuals employed by those entities. No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits) between the highest and lowest individual in the entity is greater than 50 : 1 may use the Work for any reason. No private business run for profit with more than a thousand employees may use the Work for any reason. Unless the User has made substantial changes to the Work, or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.), they are prohibited from selling the Work. That prohibition includes processing the Work with machine learning models. ## Sanctions If the Licensor notifies the User that they have not complied with the rules of the license, they can keep their license by complying within 30 days after the notice. If they do not do so, their license ends immediately. ## Warranty This Work is provided “as is”, without warranty of any kind, express or implied. The Licensor will not be liable to anyone for any damages related to the Work or this license, under any kind of legal claim as far as the law allows.
keywords webserver fastapi quickstart
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastAPI WebServer

This is a wrapper of a FAST API application with some additional features that might be useful for quick web development.

It features:
- Powerful environment and settings handling with Dynamic module import like Django;
- A Database Adapter to connect to any database on-the-fly;
- A Data Migration Tool, to run `.sql` files, or migrate `json` data;
- An SMTP service, implemented on top of [fastapi-mail](https://pypi.org/project/fastapi-mail/);
- [SASS](https://sass-lang.com/) Compiler;
- Server-Side Rendering via `Jinja2Template`;
- Static Files provider;
- CORS Support;
- TLS Support + [mkcert](https://github.com/FiloSottile/mkcert) certificates (local/development only)

## Roadmap

The following features are expected to be implemented in the future. Contribution is welcome.

- [ ] OCI-Compliant Image for Docker/Podman
- [ ] Local Key-Value Cache
- [ ] Logging and Tracing API (via OpenTelemetry)
- [ ] Authentication and Authorization
  - [ ] OAuth2 support
  - [ ] OpenID Connect support
  - [ ] Passkey support (via [Bitwarden passwordless](https://docs.passwordless.dev/guide/))
- [ ] Traffic Analyzer
  - [ ] (AI) Bot detector
  - [ ] VPN detector
  - [ ] Rate limiter
  - [ ] IP-based Access-Control List (ACL)
- [ ] Content Providers (HTTP client and proxy)
  - [ ] Google Fonts API
  - [ ] Gravatar
  - [ ] GIPHY

## Getting Started

Optionally, set up the environment variables. All environment variables can be found on `.env` file in the root of this repository.

```python
import webserver
from fastapi import APIRouter, FastAPI

router: APIRouter = APIRouter()
app: FastAPI = webserver.app


@router.get("/")
def index():
  return {"Hello World": f"from {webserver.settings.APP_NAME}"}


app.include_router(router)

if __name__ == "__main__":
  webserver.start()
```

This enables both local execution through `main` method as well as `fastapi (dev|run)` commands.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fastapi-webserver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "webserver, fastapi, quickstart",
    "author": null,
    "author_email": "Artemis Resende <artemis@aresende.com>",
    "download_url": "https://files.pythonhosted.org/packages/68/96/32483eb8d88e244d7d6253f0d58f1fb706fc374f71bc4602d6363ba193aa/fastapi_webserver-0.3.4.tar.gz",
    "platform": null,
    "description": "# FastAPI WebServer\n\nThis is a wrapper of a FAST API application with some additional features that might be useful for quick web development.\n\nIt features:\n- Powerful environment and settings handling with Dynamic module import like Django;\n- A Database Adapter to connect to any database on-the-fly;\n- A Data Migration Tool, to run `.sql` files, or migrate `json` data;\n- An SMTP service, implemented on top of [fastapi-mail](https://pypi.org/project/fastapi-mail/);\n- [SASS](https://sass-lang.com/) Compiler;\n- Server-Side Rendering via `Jinja2Template`;\n- Static Files provider;\n- CORS Support;\n- TLS Support + [mkcert](https://github.com/FiloSottile/mkcert) certificates (local/development only)\n\n## Roadmap\n\nThe following features are expected to be implemented in the future. Contribution is welcome.\n\n- [ ] OCI-Compliant Image for Docker/Podman\n- [ ] Local Key-Value Cache\n- [ ] Logging and Tracing API (via OpenTelemetry)\n- [ ] Authentication and Authorization\n  - [ ] OAuth2 support\n  - [ ] OpenID Connect support\n  - [ ] Passkey support (via [Bitwarden passwordless](https://docs.passwordless.dev/guide/))\n- [ ] Traffic Analyzer\n  - [ ] (AI) Bot detector\n  - [ ] VPN detector\n  - [ ] Rate limiter\n  - [ ] IP-based Access-Control List (ACL)\n- [ ] Content Providers (HTTP client and proxy)\n  - [ ] Google Fonts API\n  - [ ] Gravatar\n  - [ ] GIPHY\n\n## Getting Started\n\nOptionally, set up the environment variables. All environment variables can be found on `.env` file in the root of this repository.\n\n```python\nimport webserver\nfrom fastapi import APIRouter, FastAPI\n\nrouter: APIRouter = APIRouter()\napp: FastAPI = webserver.app\n\n\n@router.get(\"/\")\ndef index():\n  return {\"Hello World\": f\"from {webserver.settings.APP_NAME}\"}\n\n\napp.include_router(router)\n\nif __name__ == \"__main__\":\n  webserver.start()\n```\n\nThis enables both local execution through `main` method as well as `fastapi (dev|run)` commands.\n",
    "bugtrack_url": null,
    "license": "# \ud83c\udff3\ufe0f\u200d\ud83c\udf08 Opinionated Queer License v1.1\n        \n        \u00a9 Copyright [Andrea Vos](https://avris.it), [Kolektyw \u201eRada J\u0119zyka Neutralnego\u201d](https://zaimki.pl/kolektyw-rjn)\n        \n        <div class=\"table-responsive\">\n            <table class=\"table\">\n                <thead>\n                <tr class=\"text-center\">\n                    <th>You can</th>\n                    <th>You cannot</th>\n                    <th>You must</th>\n                </tr>\n                </thead>\n                <tbody>\n                <tr>\n                    <td>\n                        <ul>\n                            <li>Use privately</li>\n                            <li>Use commercially</li>\n                            <li>Modify</li>\n                            <li>Adapt</li>\n                            <li>Distribute</li>\n                            <li>Sublicense</li>\n                            <li>Use a patent</li>\n                            <li>Add a warranty</li>\n                        </ul>\n                    </td>\n                    <td>\n                        <ul>\n                            <li>Hold the Licensor liable</li>\n                            <li>Be a big corporation</li>\n                            <li>Be law enforcement or military</li>\n                            <li>Use for bigoted purposes</li>\n                            <li>Use for violent purposes</li>\n                            <li>Just blatantly resell it<br/><small>(even if laundered through machine learning)</small></li>\n                        </ul>\n                    </td>\n                    <td>\n                        <ul>\n                            <li>Give credit</li>\n                            <li>Indicate changes made</li>\n                            <li>Include license or a link</li>\n                        </ul>\n                    </td>\n                </tr>\n                </tbody>\n            </table >\n        </div>\n        \n        ## Permissions\n        \n        The creators of this Work (\u201cThe Licensor\u201d) grant permission\n        to any person, group or legal entity that doesn't violate the prohibitions below (\u201cThe User\u201d),\n        to do everything with this Work that would otherwise infringe their copyright or any patent claims,\n        subject to the following conditions:\n        \n        ## Obligations\n        \n        The User must give appropriate credit to the Licensor,\n        provide a copy of this license or a (clickable, if the medium allows) link to\n        [oql.avris.it/license/v1.1](https://oql.avris.it/license/v1.1),\n        and indicate whether and what kind of changes were made.\n        The User may do so in any reasonable manner,\n        but not in any way that suggests the Licensor endorses the User or their use.\n        \n        ## Prohibitions\n        \n        No one may use this Work for prejudiced or bigoted purposes, including but not limited to:\n        racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny.\n        \n        No one may use this Work to inflict or facilitate violence or abuse of human rights as defined in the\n        [Universal Declaration of Human Rights](https://www.un.org/en/about-us/universal-declaration-of-human-rights).\n        \n        No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors\n        may use the Work for any reason. This also applies to any individuals employed by those entities.\n        \n        No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits)\n        between the highest and lowest individual in the entity is greater than 50 : 1\n        may use the Work for any reason.\n        \n        No private business run for profit with more than a thousand employees\n        may use the Work for any reason.\n        \n        Unless the User has made substantial changes to the Work,\n        or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.),\n        they are prohibited from selling the Work.\n        That prohibition includes processing the Work with machine learning models.\n        \n        ## Sanctions\n        \n        If the Licensor notifies the User that they have not complied with the rules of the license,\n        they can keep their license by complying within 30 days after the notice.\n        If they do not do so, their license ends immediately.\n        \n        ## Warranty\n        \n        This Work is provided \u201cas is\u201d, without warranty of any kind, express or implied.\n        The Licensor will not be liable to anyone for any damages related to the Work or this license,\n        under any kind of legal claim as far as the law allows.\n        ",
    "summary": "A simple FastAPI webserver with a bunch of useful resources.",
    "version": "0.3.4",
    "project_urls": {
        "Homepage": "https://gitlab.com/aresende/fastapi-webserver"
    },
    "split_keywords": [
        "webserver",
        " fastapi",
        " quickstart"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7726af4de266eafaf32a6718406f413adbe96f9fd3107706536af5d75cc6dc66",
                "md5": "dbf8a089f53368309b37de63f98bba1d",
                "sha256": "5758a1ceda85eea2ed215cd5ebe5fd62e9340a7ed80298aeb18ae20afc7fae46"
            },
            "downloads": -1,
            "filename": "fastapi_webserver-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dbf8a089f53368309b37de63f98bba1d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 13219,
            "upload_time": "2025-02-22T20:26:03",
            "upload_time_iso_8601": "2025-02-22T20:26:03.700982Z",
            "url": "https://files.pythonhosted.org/packages/77/26/af4de266eafaf32a6718406f413adbe96f9fd3107706536af5d75cc6dc66/fastapi_webserver-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "689632483eb8d88e244d7d6253f0d58f1fb706fc374f71bc4602d6363ba193aa",
                "md5": "dbd401032b2ad78d5d9385895f700f22",
                "sha256": "954a2feb238894a148988437f2b113a8f542950e26519f5e742063e0b360de2e"
            },
            "downloads": -1,
            "filename": "fastapi_webserver-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "dbd401032b2ad78d5d9385895f700f22",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 10574,
            "upload_time": "2025-02-22T20:26:05",
            "upload_time_iso_8601": "2025-02-22T20:26:05.729016Z",
            "url": "https://files.pythonhosted.org/packages/68/96/32483eb8d88e244d7d6253f0d58f1fb706fc374f71bc4602d6363ba193aa/fastapi_webserver-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-22 20:26:05",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "aresende",
    "gitlab_project": "fastapi-webserver",
    "lcname": "fastapi-webserver"
}
        
Elapsed time: 1.23550s