pyShelf Open Source Ebook Server 0.8.0
FOSS E-Book Server, https://pyshelf.com
FastAPIServer.FastAPIServer Class Reference

Public Member Functions

 __init__ (self, config)
 compile_static_files (self)
None use_route_names_as_operation_ids (self, FastAPI app)
 index (Request request, int skip=0, int limit=30)
 books (Request request, int skip=0, int limit=10, collection=None)
 book (Request request, int book_id)
 book (Request request, int book_id)
 collections (Request request)
 collection (Request request, str collection, int skip=0, int limit=30)
 search_books_api (Request request, str search)
 run (self)

Public Attributes

 config = config
 fe_config
 fe_server = uvicorn.Server(self.fe_config)
JSInterface JSInterface = JSInterface(self.config)

Detailed Description

Entry point for FastAPI server.

Constructor & Destructor Documentation

◆ __init__()

FastAPIServer.FastAPIServer.__init__ ( self,
config )
Initialize FastAPIServer object parameters.

Member Function Documentation

◆ book() [1/2]

FastAPIServer.FastAPIServer.book ( Request request,
int book_id )

◆ book() [2/2]

FastAPIServer.FastAPIServer.book ( Request request,
int book_id )

◆ books()

FastAPIServer.FastAPIServer.books ( Request request,
int skip = 0,
int limit = 10,
collection = None )

◆ collection()

FastAPIServer.FastAPIServer.collection ( Request request,
str collection,
int skip = 0,
int limit = 30 )
Collection file responder.

◆ collections()

FastAPIServer.FastAPIServer.collections ( Request request)

◆ compile_static_files()

FastAPIServer.FastAPIServer.compile_static_files ( self)
Compile static files for web frontend.

◆ index()

FastAPIServer.FastAPIServer.index ( Request request,
int skip = 0,
int limit = 30 )

◆ run()

FastAPIServer.FastAPIServer.run ( self)
Front end server entrypoint.

◆ search_books_api()

FastAPIServer.FastAPIServer.search_books_api ( Request request,
str search )
Collection file responder.

◆ use_route_names_as_operation_ids()

None FastAPIServer.FastAPIServer.use_route_names_as_operation_ids ( self,
FastAPI app )
Use route name as operation id.

Member Data Documentation

◆ config

FastAPIServer.FastAPIServer.config = config

◆ fe_config

FastAPIServer.FastAPIServer.fe_config
Initial value:
= uvicorn.Config(app, host="0.0.0.0", port=8080,
log_level="info", reload=True)

◆ fe_server

FastAPIServer.FastAPIServer.fe_server = uvicorn.Server(self.fe_config)

◆ JSInterface

JSInterface FastAPIServer.FastAPIServer.JSInterface = JSInterface(self.config)

The documentation for this class was generated from the following file: