Skip to main content
https://travis-ci.org/cloudboss/friend.svg?branch=master

What is Friend?

Friend is all of those of utilities you keep reimplementing across your Python projects, that all got together and decided to live in harmony.

Maybe you just parsed some YAML that contained some configuration in “snake_case”, and you want to pass this configuration to a boto3 function which takes the same values but in “PascalCase”. Then you might find snake_to_pascal_obj or one of its variants to come in handy.

with open('conf.yml') as f:
    conf = yaml.load(f)

ec2 = boto3.resource('ec2')
ec2.create_instances(
    ImageId='ami-12345678',
    BlockDeviceMappings=snake_to_pascal_obj(conf['block_device_mappings']),
    ....
)

Or you need to add a retry to that script that keeps breaking your Jenkins job because the corporate proxy fails about 5% of the time. Sure, you can add a try/except and wrap it in a for loop, but putting the retryable decorator on top of that problematic function will do that for you in one configurable line.

@retryable(times=5)
def flaky_function():
    status = requests.get('https://service.corp/v2/status').json()
    if 'error' in status:
        send_important_email(status['error'])

Read the full documentation at http://friend.readthedocs.io.

Metadata

Release files for friend 0.2.1

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

Source distribution (sdist)

Source distribution for friend 0.2.1
File Size Uploaded
friend-0.2.1.tar.gz 14.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for friend 0.2.1
File Interpreter ABI Platform
friend-0.2.1-py3-none-any.whl Python 3 none any Details
friend-0.2.1-py2-none-any.whl Python 2 none any Details

Total release size: 35.4 kB

Release files / friend-0.2.1.tar.gz

Download URL friend-0.2.1.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be432d259d758d5abe6842214ea2f4e4e4021003c27a9c8e129b87e3fc9cd835
BLAKE2b-256 checksum
How to use checksums
226d046e0e2de30f4e0485af13d2608afc651504cde62d48d64b7de3e8b73b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / friend-0.2.1-py3-none-any.whl

Download URL friend-0.2.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e06ff3a690f91b8616fd47299c61449823b403a1f82565ec45eba25628feec
BLAKE2b-256 checksum
How to use checksums
add4c673c03880f680d4c44c93e143717b767baca4cdc286b59835cb5a851ed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / friend-0.2.1-py2-none-any.whl

Download URL friend-0.2.1-py2-none-any.whl
Size 10.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4260ffe877a33784e82197d871b02058ec51e40b7022974154337726cc8131a9
BLAKE2b-256 checksum
How to use checksums
9774b28c915b4183a612fa333926918caedc564f46bcdfbe8390f1309a0f6459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

3 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.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