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

Classes

class  FastAPIServer

Functions

str base64decode (string)
str summarize (string)
str convertDateTime (datetime timestamp)
dumps books_tojson (obj)
dumps book_tojson (book)
dumps tojson (obj)
dumps collections_tojson (collection)

Variables

 app = FastAPI()
 STATIC_DIR
 TEMPLATES_DIR
 templates = Jinja2Templates(directory=str(TEMPLATES_DIR))
list origins
 allow_origins
 allow_credentials
 allow_methods
 allow_headers

Detailed Description

pyShelf's main frontend library.

Function Documentation

◆ base64decode()

str FastAPIServer.base64decode ( string)
Decode a base64 string.

◆ book_tojson()

dumps FastAPIServer.book_tojson ( book)
Convert a book object to a json.

◆ books_tojson()

dumps FastAPIServer.books_tojson ( obj)
Convert an object to a dictionary.

◆ collections_tojson()

dumps FastAPIServer.collections_tojson ( collection)
Convert a collections object to json.

◆ convertDateTime()

str FastAPIServer.convertDateTime ( datetime timestamp)
Convert a datetime object to a string.

◆ summarize()

str FastAPIServer.summarize ( string)
Summarize a string.

◆ tojson()

dumps FastAPIServer.tojson ( obj)

Variable Documentation

◆ allow_credentials

FastAPIServer.allow_credentials

◆ allow_headers

FastAPIServer.allow_headers

◆ allow_methods

FastAPIServer.allow_methods

◆ allow_origins

FastAPIServer.allow_origins

◆ app

FastAPIServer.app = FastAPI()

◆ origins

list FastAPIServer.origins
Initial value:
1= [
2 "http://localhost",
3 "http://localhost:8081",
4 "http://localhost:8080",
5 "*"
6]

◆ STATIC_DIR

FastAPIServer.STATIC_DIR

◆ templates

FastAPIServer.templates = Jinja2Templates(directory=str(TEMPLATES_DIR))

◆ TEMPLATES_DIR

FastAPIServer.TEMPLATES_DIR