Skip to main content

yc-aws-wrapper

About:

A little sugar for working with Yandex cloud services. May also be compatible with other AWS clones.
The wrapper is written for your own needs and primarily for working with Yandex Cloud, ready for criticism and suggestions.

To run tests, in addition to the necessary environment variables, you need S3_BUCKET the location of your test bucket

ENV:

  • REQUIRED

    AWS_REGION: region
    AWS_ACCESS_KEY_ID: key id
    AWS_SECRET_ACCESS_KEY: secret from key id

  • SITUATIONAL:

    [SERVICE]_ENDPOINT_URL: endpoint for the service, example for yandex sqs: SQS_ENDPOINT_URL=https://message-queue.api.cloud.yandex.net

  • ADDITIONAL:
    • SQS:

      SQS_TUBE_[Method_Name]: Contains the name of the queue to be accessed via a method.
      Example: SQS_TUBE_FOO=sqs-aws-wrapper | sqs.foo.send(*args, **kwargs)

    • S3:

      S3_BUCKET_[Method_Name]: Contains the name of the bucket to be accessed via a method.
      Example: S3_BUCKET_FOO=bucket-aws-wrapper | s3.foo.send(*args, **kwargs)

    • SESV2:

      SESV2_MAILBOX_[Method_Name]: Contains the name of the mailbox to be accessed via a method.
      Example: SESV2_MAILBOX_FOO=mail@aws-wrapper.net | sesv2.foo.send(*args, **kwargs)

    • Kinesis:

      KINESIS_FOLDER:
      KINESIS_DATABASE:
      KINESIS_STREAM_NAME:

Example:

Let's send a message to three queues, one of which is not declared in the environment variables, as a result we will get dictionaries symbolizing a successful result for "foo" and "bar", as well as none, indicating that nothing was sent, example code_1
You can also send a message to all queues using a loop, but first you need to force load all environment variables, example code_2 envs:

AWS_REGION=ru.central1
AWS_ACCESS_KEY_ID=<KEY_ID>
AWS_SECRET_ACCESS_KEY=<SECRET_KEY>
SQS_ENDPOINT_URL=https://message-queue.api.cloud.yandex.net
SQS_TUBE_FOO=foo-aws-wrapper SQS_TUBE_BAR=bar-aws-wrapper

code_1:

import from yc_aws_wrapper.s3 import SQS

sqs = SQS()
response = sqs.foo.send("Hellow World")
type(response) is dict
response = sqs.bar.send("Hellow World")
type(response) is dict
response = sqs.baz.send("Hellow World")
type(response) is None

code_2:

import from yc_aws_wrapper.s3 import SQS

sqs = SQS()
sqs.load_all_clients()
for el in sqs:
el.send("Hellow World")

Metadata

Release files for yc-aws-wrapper 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yc-aws-wrapper 0.0.6
File Size Uploaded
yc_aws_wrapper-0.0.6.tar.gz 23.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yc-aws-wrapper 0.0.6
File Interpreter ABI Platform
yc_aws_wrapper-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 58.1 kB

Release files / yc_aws_wrapper-0.0.6.tar.gz

Download URL yc_aws_wrapper-0.0.6.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8d4a1ba4e9b97dfe400d86b8391bfe9fecaa2a9124863a4b0d0ec8cc03bfca2d
BLAKE2b-256 checksum
How to use checksums
7e638977c6f4973368ca18a813fc6a1a11dc912b53bf6295f12d34ff14a92af6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / yc_aws_wrapper-0.0.6-py3-none-any.whl

Download URL yc_aws_wrapper-0.0.6-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05ab5fb3a6c25f6e553dca487d20fbdb8e2a743272831b8b81bdee6d433069ba
BLAKE2b-256 checksum
How to use checksums
5006b8dab204d6f266dba3a2feffe5f06e318530d72d720b7fd096a5b96c819b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page