outline client#
outline.client module#
Outline API wrapper
- class outline.client.DataTransfered(data: dict)[source]#
Bases:
BaseMetaBase class for Outline data transfered
- by_key(access_key: str | int | OutlineAccessKey) int[source]#
Returns the data transfered by the given access key
- bytesTransferredByUserId: dict[str, int] = {}#
- property total: int#
Returns the total data transfered
- class outline.client.OutlineAccessKey(client: OutlineClient, data: dict)[source]#
Bases:
BaseMetaBase class for Outline access keys
- accessUrl: str#
- change_data_limit(limit: int)[source]#
Sets a data transfer limit for an access key
limit (int): The limit in bytes
- dataLimit: dict = {'bytes': 0}#
- id: str#
- property limit: int#
Returns the data limit in bytes
- method: str#
- property metrics: int#
Returns the data transfered by the access key
- name: str#
- password: str#
- port: int#
- class outline.client.OutlineClient(base_url: str)[source]#
Bases:
objectBase class for Outline servers
- change_data_limit(limit: int)[source]#
Sets a data transfer limit for all access keys
limit (int): The limit in bytes
- change_data_limit_for_key(access_key: int | str | OutlineAccessKey, limit: int)[source]#
Sets a data transfer limit for an access key
access_key (int | str | OutlineAccessKey): Access key
limit (int): The limit in bytes
- change_hostname(hostname: str)[source]#
Changes the hostname for access keys. Must be a valid hostname or IP address. If it’s a hostname, DNS must be set up independently of this API.
hostname (str): The hostname or IP address to use
- change_port(port: int)[source]#
Changes the default port for newly created access keys. This can be a port already used for access keys.
port (int): The port to use must be between 1 and 65535
- delete_key(access_key: int | str | OutlineAccessKey)[source]#
Deletes an access key
Returns whether metrics is being shared
- key(access_key: str | int) OutlineAccessKey[source]#
Returns an access key
- property keys: list[OutlineAccessKey]#
Returns a list of access keys
- property metrics: DataTransfered#
Returns the data transfered
Enables or disables sharing of metrics
shared (bool): Whether to share metrics
- new(method: str = 'aes-192-gcm', name: str = '')[source]#
Creates a new access key
method (str): The encryption method to use name (str): The name of the access key
- rename_key(access_key: int | str | OutlineAccessKey, name: str)[source]#
Renames an access key
access_key (int | str | OutlineAccessKey): The access key to rename name (str): The new name
- reset_data_limit()[source]#
Removes the access key data limit, lifting data transfer restrictions on all access keys.
- reset_data_limit_key(access_key: int | str | OutlineAccessKey)[source]#
Removes the access key data limit, lifting data transfer restrictions on an access key.
access_key (int | str | OutlineAccessKey): Access key