pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
267 B
11 lines
267 B
from sqlalchemy.ext.declarative import declarative_base, declared_attr
|
|
|
|
|
|
class CustomBase(object):
|
|
# Generate __tablename__ automatically
|
|
@declared_attr
|
|
def __tablename__(cls):
|
|
return cls.__name__.lower()
|
|
|
|
|
|
Base = declarative_base(cls=CustomBase)
|
|
|