hyx

πŸ§˜β€β™€οΈ Lightweight fault tolerant primitives for your modern asyncio Python microservices

https://github.com/roma-glushko/hyx

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • βœ“
    CITATION.cff file
    Found CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • β—‹
    Academic publication links
  • β—‹
    Committers with academic emails
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

asyncio chaos-engineering circuit-breaker distributed-systems high-availability python3 resilience stability-patterns
Last synced: 6 months ago · JSON representation ·

Repository

πŸ§˜β€β™€οΈ Lightweight fault tolerant primitives for your modern asyncio Python microservices

Basic Info
Statistics
  • Stars: 83
  • Watchers: 2
  • Forks: 6
  • Open Issues: 27
  • Releases: 3
Topics
asyncio chaos-engineering circuit-breaker distributed-systems high-availability python3 resilience stability-patterns
Created about 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation Roadmap

README.md

Hyx

πŸ§˜β€β™‚οΈοΈLightweight fault tolerance primitives for your resilient and modern Python microservices

Package Version Downloads Supported Python Versions Discord
Documentation Status Test Status Coverage


Hyx (/ˈhʌΙͺx/) is a set of well-known stability patterns that are commonly needed when you build microservice-based applications. Hyx is meant to be Hystrix (Java), resilience4j (Java) or Polly (C#) but for the Python world.

Key Features

  • Implements five commonly used resiliency patterns with various configurations based on advice and experience of industry leaders (e.g. AWS, Google, Netflix)
  • Idiomatic Pythonic implementation based on decorators and context managers
  • AsyncIO Native Implementation
  • Lightweight. Readable Codebase. High Test Coverage

Requirements

Installation

Hyx can be installed from PyPi:

``` sh pip install hyx

or via poetry

poetry add hyx ```

Component Map

| Component | Problem | Solution | Implemented? | |-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| | πŸ” Retry | The failures happen sometimes, but they self-recover after a short time | Automatically retry operation on temporary failures | βœ… | | πŸ’Ύ Cache | | | | | ⚑️ Circuit Breaker | When downstream microservices have got overloaded, sending even more load can make the situation only worse. | Stop doing requests to your failing microservice temporarily if amount of errors exceeded expected thresholds. Then see if the given time helped the microservice to recover | βœ… | | ⏱ Timeout | Sometimes operations may take too much time. We cannot wait that long or after that time the success is unlikely | Bound waiting to a reasonable amount of time | βœ… | | 🚰 Bulkhead | If executed without control, some code can take too much resources and put down the whole application (and upstream services) or cause slowness of other places of the application | Fix the amount of calls to the code, queue other calls and fail calls that goes beyond your capacity | βœ… | | πŸƒβ€β™‚οΈ Rate Limiter | The microservice can be requested with any rate even one that can put it down if happens by accident | Limit the rate your system can be accessed by | βœ… | | 🀝 Fallback | Nothing can guarantee you that your dependencies will work. What would you do when it's failing? | Degrade gracefully by defining some default values or placeholders if your dependencies are down | βœ… |

Inspired by Polly's Resiliency Policies

Acknowledgements

Owner

  • Name: Roman Glushko
  • Login: roma-glushko
  • Kind: user
  • Location: Ukraine
  • Company: @DataRobot

Software Engineer, Distributed Systems, ML/DL

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Hyx
message: >-
  If you use this software, please cite it using the
  metadata from this file
type: software
authors:
  - given-names: Roman
    family-names: Hlushko
    email: roman.glushko.m@gmail.com
repository-code: 'https://github.com/roma-glushko/hyx'
url: 'https://hyx.readthedocs.io/en/latest/'
abstract: >-
  Lightweight fault tolerant primitives for your modern
  asyncio Python microservices
keywords:
  - distributed systems
  - resiliency patterns
  - microservices
  - circuit breakers
  - retries
  - bulkheads
license: MIT

GitHub Events

Total
  • Issues event: 3
  • Watch event: 8
Last Year
  • Issues event: 3
  • Watch event: 8

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 55
  • Total Committers: 1
  • Avg Commits per committer: 55.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Roman Glushko r****m@g****m 55

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 53
  • Total pull requests: 48
  • Average time to close issues: 24 days
  • Average time to close pull requests: 9 days
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.28
  • Average comments per pull request: 0.0
  • Merged pull requests: 43
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • roma-glushko (53)
  • dicolasi (1)
Pull Request Authors
  • roma-glushko (44)
  • kevkevy3000 (2)
  • Chris2W (1)
Top Labels
Issue Labels
type:enhancement (26) type:documentation (20) component:ratelimiter (7) component:retry (4) component:bulkead (4) area:observability (3) area:devexp (3) component:breaker (3) good first issue (3) area:cicd (2) component:cache (2) type:example (1) component:fallback (1) tests (1) component:hedge (1) type:bug (1)
Pull Request Labels
type:enhancement (17) type:documentation (13) area:devexp (3) component:retry (2) tests (2) component:ratelimiter (2) type:bug (2) type:example (1) component:bulkead (1) component:fallback (1) component:timeout (1) component:breaker (1) area:observability (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 684 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: hyx

Lightweight fault tolerance primitives for your modern Python microservices

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 684 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 25.5%
Average: 28.6%
Forks count: 30.5%
Dependent repos count: 30.6%
Downloads: 49.9%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/tests.yml actions
  • actions/cache v2 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v2 composite
  • snok/install-poetry v1 composite
poetry.lock pypi
  • Jinja2 3.1.2 develop
  • Markdown 3.3.7 develop
  • MarkupSafe 2.1.1 develop
  • PyYAML 6.0 develop
  • Pygments 2.14.0 develop
  • anyio 3.6.2 develop
  • attrs 22.2.0 develop
  • black 22.12.0 develop
  • certifi 2022.12.7 develop
  • charset-normalizer 3.0.1 develop
  • click 8.1.3 develop
  • colorama 0.4.6 develop
  • coverage 7.0.5 develop
  • cyclic 1.0.0 develop
  • exceptiongroup 1.1.0 develop
  • ghp-import 2.1.0 develop
  • glob2 0.7 develop
  • h11 0.14.0 develop
  • httpcore 0.16.3 develop
  • httpx 0.23.3 develop
  • idna 3.4 develop
  • importlib-metadata 6.0.0 develop
  • iniconfig 2.0.0 develop
  • isort 5.11.4 develop
  • junit-xml 1.8 develop
  • mdx-include 1.4.2 develop
  • mergedeep 1.3.4 develop
  • mkautodoc 0.2.0 develop
  • mkdocs 1.4.2 develop
  • mkdocs-material 8.5.11 develop
  • mkdocs-material-extensions 1.1.1 develop
  • mutmut 2.4.3 develop
  • mypy 0.991 develop
  • mypy-extensions 0.4.3 develop
  • packaging 23.0 develop
  • parso 0.8.3 develop
  • pathspec 0.10.3 develop
  • platformdirs 2.6.2 develop
  • pluggy 1.0.0 develop
  • pony 0.7.16 develop
  • pymdown-extensions 9.9.1 develop
  • pytest 7.2.1 develop
  • pytest-asyncio 0.20.3 develop
  • pytest-cov 4.0.0 develop
  • python-dateutil 2.8.2 develop
  • pyyaml_env_tag 0.1 develop
  • rcslice 1.1.0 develop
  • requests 2.28.2 develop
  • rfc3986 1.5.0 develop
  • ruff 0.0.182 develop
  • six 1.16.0 develop
  • sniffio 1.3.0 develop
  • toml 0.10.2 develop
  • tomli 2.0.1 develop
  • typing-extensions 4.4.0 develop
  • urllib3 1.26.14 develop
  • watchdog 2.2.1 develop
  • zipp 3.11.0 develop
pyproject.toml pypi
  • python >=3.9,<4.0