hyx
π§ββοΈ Lightweight fault tolerant primitives for your modern asyncio Python microservices
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
Repository
π§ββοΈ Lightweight fault tolerant primitives for your modern asyncio Python microservices
Basic Info
- Host: GitHub
- Owner: roma-glushko
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://hyx.readthedocs.io/en/latest/
- Size: 236 KB
Statistics
- Stars: 83
- Watchers: 2
- Forks: 6
- Open Issues: 27
- Releases: 3
Topics
Metadata Files
README.md
π§ββοΈοΈLightweight fault tolerance primitives for your resilient and modern Python microservices
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
- Python 3.9+
- AsyncIO-powered applications (no sync support?)
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
- Website: https://www.romaglushko.com/
- Twitter: roma_glushko
- Repositories: 19
- Profile: https://github.com/roma-glushko
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 | 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
Pull Request Labels
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
- Documentation: https://hyx.readthedocs.io/
- License: Apache-2.0
-
Latest release: 0.0.2
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- actions/cache v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v2 composite
- snok/install-poetry v1 composite
- 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
- python >=3.9,<4.0