Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: remove FastAPI #304

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,6 @@ Descriptions and examples of functions can be found in the :ref:`API Reference <

See the `asyncio module documentation <https://docs.python.org/3/library/asyncio.html>`_ for more information.

REST server
-----------

Core Cool-Seq-Tool functions can also be performed via a REST HTTP interface, provided via `FastAPI <https://fastapi.tiangolo.com/>`_. Use the ``uvicorn`` shell command to start a server instance:

.. code-block:: shell

uvicorn cool_seq_tool.api:app

By default, ``uvicorn`` serves to port 8000. Once initialized, go to `<http://localhost:8000/cool_seq_tool>`_ in a web browser for OpenAPI docs describing available endpoints.

REST routes are defined using the FastAPI ``APIRouter`` class, meaning that they can also be mounted to other FastAPI applications:

.. code-block:: python

from fastapi import FastAPI
from cool_seq_tool.routers import mane

app = FastAPI()
app.include_router(mane.router)

.. _configuration:

Environment configuration
Expand Down
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ authors = [
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: FastAPI",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Science/Research",
Expand All @@ -33,8 +32,6 @@ dependencies = [
"hgvs",
"biocommons.seqrepo",
"pydantic == 2.*",
"uvicorn",
"fastapi",
"ga4gh.vrs",
"wags-tails ~= 0.1.3"
]
Expand Down Expand Up @@ -178,8 +175,5 @@ lint.ignore = [
"*__init__.py" = ["F401"]
"src/cool_seq_tool/schemas.py" = ["ANN201", "N805", "ANN001"]

[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["fastapi.Query"]

[tool.ruff.format]
docstring-code-format = true
41 changes: 0 additions & 41 deletions src/cool_seq_tool/api.py

This file was deleted.

17 changes: 0 additions & 17 deletions src/cool_seq_tool/routers/__init__.py

This file was deleted.

128 changes: 0 additions & 128 deletions src/cool_seq_tool/routers/default.py

This file was deleted.

98 changes: 0 additions & 98 deletions src/cool_seq_tool/routers/mane.py

This file was deleted.

Loading
Loading