A nano package for working with Yandex Cloud
Project description
from nanoyc.logging import CloudLogger
logger=CloudLogger(
iam_token='t1.9...', # your token
log_group_id='e230...' # your cloud logger group id
)
logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')
#OR
# if u are using insede cloud function or imside vm
# apply service account with rights logging.writer
CloudLogger(
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')
# OR if you have a service account key
sa_key = {
"id": "...",
"service_account_id": "...",
"private_key": "..."
}
CloudLogger(
service_account_key=sa_key,
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')
logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')
#OR
# if you have a service account key file
# Obtain it with yandex cloud cli
#account shoud have rights 'logging.writer'
# >yc iam key create --service-account-name [service_account_name] --output sa_key.json
CloudLogger(
service_account_file='sa_key.json',
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')
logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')
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
nanoyc-logging-0.1.0.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file nanoyc-logging-0.1.0.tar.gz
.
File metadata
- Download URL: nanoyc-logging-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4acf37a8a80685164417907163652e0d4134d7da6509fd21cf7439c808fde201 |
|
MD5 | 9efe69b70c1eb97ace5fd517daef0565 |
|
BLAKE2b-256 | b56005c69a8d29cbf62ae86e3ee909476ddf404e61ff00cdf5284f36a8790330 |
File details
Details for the file nanoyc_logging-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: nanoyc_logging-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0d265b66ed18e46955d9e511d32eceb899a44ad95980695817c12fb1081d55f |
|
MD5 | 721baecdcd3a670c361f7b18bee4dd44 |
|
BLAKE2b-256 | b25f99e980c972072f02dca7d9d1ca2796ef445755635aaadb33888c021c9adf |