{"id":16691335,"url":"https://github.com/gr1n/nats-python","last_synced_at":"2025-04-09T13:09:15.544Z","repository":{"id":47002109,"uuid":"146794739","full_name":"Gr1N/nats-python","owner":"Gr1N","description":"Python client for NATS messaging system","archived":false,"fork":false,"pushed_at":"2023-05-02T11:44:14.000Z","size":64,"stargazers_count":85,"open_issues_count":8,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-11-20T16:22:38.350Z","etag":null,"topics":["nats","nats-client","natsio","python","python-client"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/nats-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gr1N.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-30T19:09:02.000Z","updated_at":"2024-06-18T18:13:03.453Z","dependencies_parsed_at":"2024-06-18T18:29:02.819Z","dependency_job_id":null,"html_url":"https://github.com/Gr1N/nats-python","commit_stats":{"total_commits":44,"total_committers":5,"mean_commits":8.8,"dds":"0.13636363636363635","last_synced_commit":"755ce98487ad15bec2889365d8b7caa4b2455e84"},"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fnats-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fnats-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fnats-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fnats-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gr1N","download_url":"https://codeload.github.com/Gr1N/nats-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045233,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nats","nats-client","natsio","python","python-client"],"created_at":"2024-10-12T16:07:55.942Z","updated_at":"2025-04-09T13:09:15.523Z","avatar_url":"https://github.com/Gr1N.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nats-python\n\n[![Build Status](https://github.com/Gr1N/nats-python/workflows/default/badge.svg)](https://github.com/Gr1N/nats-python/actions?query=workflow%3Adefault) [![codecov](https://codecov.io/gh/Gr1N/nats-python/branch/master/graph/badge.svg)](https://codecov.io/gh/Gr1N/nats-python) ![PyPI](https://img.shields.io/pypi/v/nats-python.svg?label=pypi%20version) ![PyPI - Downloads](https://img.shields.io/pypi/dm/nats-python.svg?label=pypi%20downloads)\n\nPython client for NATS messaging system.\n\nThis project is a replacement for abandoned [pynats](https://github.com/mcuadros/pynats). `nats-python` supports only Python 3.6+ and fully covered with typings.\n\nGo to the [asyncio-nats](https://github.com/nats-io/asyncio-nats) project, if you're looking for `asyncio` implementation.\n\n## Installation\n\n```sh\n$ pip install nats-python\n```\n\n## Usage\n\n```python\nfrom pynats import NATSClient\n\nwith NATSClient() as client:\n    # Connect\n    client.connect()\n\n    # Subscribe\n    def callback(msg):\n        print(f\"Received a message with subject {msg.subject}: {msg}\")\n\n    client.subscribe(subject=\"test-subject\", callback=callback)\n\n    # Publish a message\n    client.publish(subject=\"test-subject\", payload=b\"test-payload\")\n\n    # wait for 1 message\n    client.wait(count=1)\n```\n\n## Contributing\n\nTo work on the `nats-python` codebase, you'll want to clone the project locally and install the required dependencies via [poetry](https://poetry.eustace.io):\n\n```sh\n$ git clone git@github.com:Gr1N/nats-python.git\n$ make install\n```\n\nTo run tests and linters use command below:\n\n```sh\n$ make lint \u0026\u0026 make test\n```\n\nIf you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:\n\n```sh\n$ make lint-black\n```\n\n## License\n\n`nats-python` is licensed under the MIT license. See the license file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1n%2Fnats-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr1n%2Fnats-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1n%2Fnats-python/lists"}