No project description provided
Project description
Selectel async API
Version 0.1.4
logs creating
- Created new class
SelectelLogsClientfor logs - Create Base Class for Client and separated clases
SelectelLogsClient
- have to functions -
get_logs_task_infoandcreate_logs_task
Using of this class
async with SelectelLogsClient(keystone_token=keystone_token) as client:
task = { # task with parameters
"data": {
"container": "links",
"delete_after": 0,
# "fields": [
# ""
# ],
# "filters": {
# "additionalProp1": {},
# "additionalProp2": {},
# "additionalProp3": {}
# },
# "provider": "",
"since": "2024-05-30T06:00:00",
"till": "2024-05-30T06:00:00"
},
# "type": ""
}
task_id = await client.create_logs_task(task)
await client.get_logs_task_info(task_id)
Use like
Simple using
import asyncio
from environs import Env
from aioselectel_api.client import SelectelStorageClient, get_token
env = Env()
env.read_env('.env')
username = env('SELECTEL_USERNAME')
password = env('SELECTEL_PASSWORD')
account_id = env('SELECTEL_ACCOUNT_ID')
"""
USING ONLY Selectel Storage API 😑
"""
async def main():
keystone_token = await get_token(username=username, password=password, account_id=account_id,
project_name='My First Project')
async with SelectelStorageClient(keystone_token=keystone_token, container_name='links') as client:
print(await client.get_pubdomains())
print(await client.get_containers_settings())
if __name__ == '__main__':
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioselectel_api-0.1.4.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioselectel_api-0.1.4.tar.gz.
File metadata
- Download URL: aioselectel_api-0.1.4.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f93fd022380fc92967051a5c92412d1ebd551f2536f527a41aed013fb23e817f
|
|
| MD5 |
a27f91708531ec1802b1748898b684ae
|
|
| BLAKE2b-256 |
02d000631b586a33ca5f3d77329d5d014ca4608f8087fa3957bfc5b9ea63e1eb
|
File details
Details for the file aioselectel_api-0.1.4-py3-none-any.whl.
File metadata
- Download URL: aioselectel_api-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2ef08770c9036fb0f5b08f80eacba00eab3f102880afb3256f0fc372e47d59c
|
|
| MD5 |
d6e89a2774198646c26f99c12c8fb5ea
|
|
| BLAKE2b-256 |
4883865db1546d33da388d3e3aa7bb65803fe1fcd6e1f4e101cc3ee0837fafba
|