Skip to main content

OOWS

Build Status PyPI version

Warning — this project is in early development. Contributions and feedbacks are welcome. Usage in production systems is discouraged

OOWS (oh-owls) is an object-oriented friendly client for Amazon Web Services — AWS. It is based on boto3 official client and aims to provide a cleaner and more Pythonic interface to handle AWS resources.

Currently, Boto3 already provides the Resource Model which is a nicer and more OO-friendly interface over raw JSON, as explained here. Although it works, it does not provide an interface for resources I currently need. This project started by a personal need of mine to ease the current state of programmatic access to ECS resources.

Rationale

Suppose you want to list all of a cluster's services' task definitions. Using pure boto3, you'd need to write something like:

session = boto3.Session()
ecs_client = session.client('ecs')
services = ecs_client.list_services(cluster="MyCluster")['serviceArns']
for service in services:
    s = ecs_client.describe_services(cluster="MyCluster", services=[service])
    print("The task definition is {}".format(s['services'][0]['taskDefinition']))

But using oows, you can rewrite this code to something like:

cluster = Cluster("MyCluster")

for service in cluster.services:
    print("The task definition is {}".format(service.task_definition))

Quick Start

Currently, OOWS supports only a few ECS components and operations.

First, install it with PIP

pip install boto3 oows

As of now, you'll need to supply a regular boto3 Session

import boto3
from oows import ecs


s = boto3.Session()  # Create a new boto3 Session.

cluster = ecs.Cluster("MyCluster", s)  # Initialize a new cluster object
service = ecs.Service("server", cluster, s)  # Initialize a new service object
task_definition = service.task_definition  # Gets the service's task definition
task_definition.update_env("new_env", "new_value")  # Creates a new task definition with updated env

Metadata

Release files for OOWS 0.0.4

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

Source distribution (sdist)

Source distribution for OOWS 0.0.4
File Size Uploaded Provenance
oows-0.0.4.tar.gz 4.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for OOWS 0.0.4
File Interpreter ABI Platform
oows-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / oows-0.0.4.tar.gz

Download URL oows-0.0.4.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
50a8a03efe5adb1b4e54925f3049bf7063c6a029000ce5b9324220ac169bd47d
BLAKE2b-256 checksum
How to use checksums
4b8276f894bee4064f4163687572b2477ea5a6e12956fc8ba0a34f94b36ac724
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / oows-0.0.4-py3-none-any.whl

Download URL oows-0.0.4-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ffa627143fce24cc70e6148c23ea0f04d3300662a73d22a4113e6b4b9510e96
BLAKE2b-256 checksum
How to use checksums
d4980eaf643bcfbc129998f10ec945e405f2a20b4e3b1f2c5b79ddd217ce935f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Security for OOWS 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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