Module datatap.api.types

The datatap.api.types library contains all of the types returned by the API.

Expand source code
"""
The `datatap.api.types` library contains all of the types returned by the API.
"""

from .database import JsonDatabaseOptions, JsonDatabase
from .dataset import JsonDataset
from .repository import JsonRepository, JsonTag, JsonSplit
from .user import JsonUser

__all__ = [
    "JsonDatabaseOptions",
    "JsonDatabase",
    "JsonDataset",
    "JsonRepository",
    "JsonTag",
    "JsonSplit",
    "JsonUser",
]

Sub-modules

datatap.api.types.database
datatap.api.types.dataset
datatap.api.types.repository
datatap.api.types.user

Classes

class JsonDatabase (*args, **kwargs)

The API type of a database.

Expand source code
class JsonDatabase(TypedDict):
    """
    The API type of a database.
    """
    uid: str
    name: str
    connectionOptions: JsonDatabaseOptions

Ancestors

  • builtins.dict

Class variables

var connectionOptionsJsonDatabaseOptionsDirect
var name : str
var uid : str
class JsonDatabaseOptions (*args, **kwargs)

Configuration options for a database that the server connects to directly.

Expand source code
class JsonDatabaseOptionsDirect(TypedDict):
    """
    Configuration options for a database that the server connects to directly.
    """
    kind: Literal["direct"]
    protocol: Union[Literal["neo4j"], Literal["neo4j+s"]]
    host: str
    port: int

Ancestors

  • builtins.dict

Class variables

var host : str
var kind : Literal['direct']
var port : int
var protocol : Union[Literal['neo4j'], Literal['neo4j+s']]
class JsonDataset (*args, **kwargs)

The API type of a dataset.

Expand source code
class JsonDataset(TypedDict):
    """
    The API type of a dataset.
    """
    uid: str
    database: str
    repository: JsonDatasetRepository
    template: Union[ImageAnnotationTemplateJson, VideoAnnotationTemplateJson]
    splits: List[str]

Ancestors

  • builtins.dict

Class variables

var database : str
var repositoryJsonDatasetRepository
var splits : List[str]
var template : Union[ImageAnnotationTemplateJsonVideoAnnotationTemplateJson]
var uid : str
class JsonRepository (*args, **kwargs)

The API type of a repository.

Expand source code
class JsonRepository(TypedDict):
    """
    The API type of a repository.
    """
    namespace: str
    name: str
    tags: List[JsonTag]

Ancestors

  • builtins.dict

Class variables

var name : str
var namespace : str
var tags : List[JsonTag]
class JsonSplit (*args, **kwargs)

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

Expand source code
class JsonSplit(TypedDict):
    split: str
    annotationCount: int

Ancestors

  • builtins.dict

Class variables

var annotationCount : int
var split : str
class JsonTag (*args, **kwargs)

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

Expand source code
class JsonTag(TypedDict):
    tag: str
    dataset: str
    updatedAt: int
    splits: List[JsonSplit]

Ancestors

  • builtins.dict

Class variables

var dataset : str
var splits : List[JsonSplit]
var tag : str
var updatedAt : int
class JsonUser (*args, **kwargs)

The API type of an individual user.

Expand source code
class JsonUser(TypedDict):
    """
    The API type of an individual user.
    """
    uid: str
    username: str
    email: str
    defaultDatabase: Optional[str]

Ancestors

  • builtins.dict

Class variables

var defaultDatabase : Optional[str]
var email : str
var uid : str
var username : str