Warning

This page was created from a pull request (#24).

aiida_restapi.routers package

Submodules

aiida_restapi.routers.auth module

Handle API authentication and authorization.

class aiida_restapi.routers.auth.Token(*, access_token, token_type)[source]

Bases: pydantic.main.BaseModel

__abstractmethods__ = frozenset({})
__annotations__ = {'access_token': <class 'str'>, 'token_type': <class 'str'>}
__class_vars__ = {}
__config__

alias of aiida_restapi.routers.auth.Config

__custom_root_type__ = False
__fields__ = {'access_token': ModelField(name='access_token', type=str, required=True), 'token_type': ModelField(name='token_type', type=str, required=True)}
__hash__ = None
static __json_encoder__(obj)
__module__ = 'aiida_restapi.routers.auth'
__post_root_validators__ = []
__pre_root_validators__ = []
__private_attributes__ = {}
__schema_cache__ = {}
__signature__ = <Signature (*, access_token: str, token_type: str) -> None>
__slots__ = {}
__validators__ = {}
_abc_impl = <_abc_data object>
access_token: str
token_type: str
class aiida_restapi.routers.auth.TokenData(*, email)[source]

Bases: pydantic.main.BaseModel

__abstractmethods__ = frozenset({})
__annotations__ = {'email': <class 'str'>}
__class_vars__ = {}
__config__

alias of aiida_restapi.routers.auth.Config

__custom_root_type__ = False
__fields__ = {'email': ModelField(name='email', type=str, required=True)}
__hash__ = None
static __json_encoder__(obj)
__module__ = 'aiida_restapi.routers.auth'
__post_root_validators__ = []
__pre_root_validators__ = []
__private_attributes__ = {}
__schema_cache__ = {}
__signature__ = <Signature (*, email: str) -> None>
__slots__ = {}
__validators__ = {}
_abc_impl = <_abc_data object>
email: str
class aiida_restapi.routers.auth.UserInDB(*, id=None, email, first_name=None, last_name=None, institution=None, hashed_password, disabled=None)[source]

Bases: aiida_restapi.models.User

__abstractmethods__ = frozenset({})
__annotations__ = {'_orm_entity': 'ClassVar[Type[orm.entities.Entity]]', 'disabled': typing.Union[bool, NoneType], 'email': 'str', 'first_name': 'Optional[str]', 'hashed_password': <class 'str'>, 'id': 'Optional[int]', 'institution': 'Optional[str]', 'last_name': 'Optional[str]'}
__class_vars__ = {'_orm_entity'}
__config__

alias of aiida_restapi.routers.auth.Config

__custom_root_type__ = False
__fields__ = {'disabled': ModelField(name='disabled', type=Optional[bool], required=False, default=None), 'email': ModelField(name='email', type=str, required=True), 'first_name': ModelField(name='first_name', type=Optional[str], required=False, default=None), 'hashed_password': ModelField(name='hashed_password', type=str, required=True), 'id': ModelField(name='id', type=Optional[int], required=False, default=None), 'institution': ModelField(name='institution', type=Optional[str], required=False, default=None), 'last_name': ModelField(name='last_name', type=Optional[str], required=False, default=None)}
__hash__ = None
static __json_encoder__(obj)
__module__ = 'aiida_restapi.routers.auth'
__post_root_validators__ = []
__pre_root_validators__ = []
__private_attributes__ = {}
__schema_cache__ = {}
__signature__ = <Signature (*, id: int = None, email: str, first_name: str = None, last_name: str = None, institution: str = None, hashed_password: str, disabled: bool = None) -> None>
__slots__ = {}
__validators__ = {}
_abc_impl = <_abc_data object>
disabled: Optional[bool]
hashed_password: str
aiida_restapi.routers.auth.authenticate_user(fake_db, email, password)[source]
aiida_restapi.routers.auth.create_access_token(data, expires_delta=None)[source]
async aiida_restapi.routers.auth.get_current_active_user(current_user=Depends(get_current_user))[source]
async aiida_restapi.routers.auth.get_current_user(token=Depends(OAuth2PasswordBearer))[source]
aiida_restapi.routers.auth.get_password_hash(password)[source]
aiida_restapi.routers.auth.get_user(db, email)[source]
async aiida_restapi.routers.auth.login_for_access_token(form_data=Depends(NoneType))[source]
async aiida_restapi.routers.auth.read_users_me(current_user=Depends(get_current_active_user))[source]
aiida_restapi.routers.auth.verify_password(plain_password, hashed_password)[source]

aiida_restapi.routers.comments module

aiida_restapi.routers.computers module

Declaration of FastAPI application.

async aiida_restapi.routers.computers.create_computer(computer, current_user=Depends(get_current_active_user))[source]

Create new AiiDA computer.

async aiida_restapi.routers.computers.get_computers_projectable_properties()[source]

Get projectable properties for computers endpoint

async aiida_restapi.routers.computers.read_computer(comp_id)[source]

Get computer by id.

async aiida_restapi.routers.computers.read_computers()[source]

Get list of all computers

aiida_restapi.routers.groups module

Declaration of FastAPI application.

async aiida_restapi.routers.groups.create_user(group, current_user=Depends(get_current_active_user))[source]

Create new AiiDA group.

async aiida_restapi.routers.groups.get_groups_projectable_properties()[source]

Get projectable properties for groups endpoint

async aiida_restapi.routers.groups.read_group(group_id)[source]

Get group by id.

async aiida_restapi.routers.groups.read_groups()[source]

Get list of all groups

aiida_restapi.routers.users module

Declaration of FastAPI application.

async aiida_restapi.routers.users.create_user(user, current_user=Depends(get_current_active_user))[source]

Create new AiiDA user.

async aiida_restapi.routers.users.get_users_projectable_properties()[source]

Get projectable properties for users endpoint

async aiida_restapi.routers.users.read_user(user_id)[source]

Get user by id.

async aiida_restapi.routers.users.read_users()[source]

Get list of all users

Module contents