Skip to main content

AIS service discovery package for python3

Project description

ais-service-discovery-python

CodeQuality Publish stable

Cloud Application Framework

logo

Description

This repository interfaces Service Discovery, in this instance CloudMap, in order to locate and communicate with different services. As opposed to storing ARN's in environment variables, this library will interface CloudMap to find a service by a user-friendly naming convention and will understand what 'type' of service you've requested and use the correct code to communicate/call that service.

Services supported

  • Lambda (call).
  • SNS (publish).
  • SQS (queue).

TODO

  • SQS (listen).
  • Http (request|call).
  • Fargate/ECS Task (run).
  • Lambda (request).

Note

This library requires Python 3.5 and above.

Examples

Lambda Call

from ais_service_discovery import call
response=call('namespace', 'service', 'handler', {<Payload>})
print(response)

Lambda Async Call

from ais_service_discovery import call
response=call('namespace', 'service', 'handler', {<Payload>}, {'InvocationType': 'Event'})
print(response)

Configuration

This library can utilise the following environment variables:

BOTO_MAX_ATTEMPTS=10 // Boto3 exponential back-off attemps
BOTO_READ_TIMEOUT=300 // Boto3 timeout 
BOTO_CONNECTION_TIMEOUT=60 // Boto3 connection timeout

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ais_service_discovery-0.2.1rc7.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ais_service_discovery-0.2.1rc7-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file ais_service_discovery-0.2.1rc7.tar.gz.

File metadata

  • Download URL: ais_service_discovery-0.2.1rc7.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ais_service_discovery-0.2.1rc7.tar.gz
Algorithm Hash digest
SHA256 c36311de894ac7b503533ab679ba2a44ac98244c1f70c16d13eac460185fee43
MD5 0acb11e654b3bc9ae9b48efa1bd28b9a
BLAKE2b-256 2fb9e8b2c3c3f82fa134b4b7b9fad32747160f228177cf0e3b31e6a54087070d

See more details on using hashes here.

File details

Details for the file ais_service_discovery-0.2.1rc7-py3-none-any.whl.

File metadata

  • Download URL: ais_service_discovery-0.2.1rc7-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ais_service_discovery-0.2.1rc7-py3-none-any.whl
Algorithm Hash digest
SHA256 16df18bfc4100bfa29a9814291e78bf5d935d66c017ff4e15ded3f13a6aab727
MD5 9b0f23ac3e938a40f519fc64f9257b27
BLAKE2b-256 39c66ddd3430f8c5cce457661815006eeaec7a4c11f27d06e9f6014ec64e69fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page