{"id":13815307,"url":"https://github.com/trendels/gevent_inotifyx","last_synced_at":"2025-10-08T23:26:35.412Z","repository":{"id":1719591,"uuid":"2449814","full_name":"trendels/gevent_inotifyx","owner":"trendels","description":"gevent compatibility for inotifyx","archived":false,"fork":false,"pushed_at":"2021-05-07T14:03:21.000Z","size":23,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-28T02:19:23.968Z","etag":null,"topics":["gevent","inotify"],"latest_commit_sha":null,"homepage":"","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/trendels.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}},"created_at":"2011-09-24T13:41:44.000Z","updated_at":"2025-07-09T05:40:02.000Z","dependencies_parsed_at":"2022-08-27T21:11:17.320Z","dependency_job_id":null,"html_url":"https://github.com/trendels/gevent_inotifyx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trendels/gevent_inotifyx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendels%2Fgevent_inotifyx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendels%2Fgevent_inotifyx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendels%2Fgevent_inotifyx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendels%2Fgevent_inotifyx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trendels","download_url":"https://codeload.github.com/trendels/gevent_inotifyx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendels%2Fgevent_inotifyx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000736,"owners_count":26082862,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gevent","inotify"],"created_at":"2024-08-04T04:03:18.729Z","updated_at":"2025-10-08T23:26:35.385Z","avatar_url":"https://github.com/trendels.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# gevent_inotifyx\n\n[![build-status-img]][build-status-url]\n[![PyPI](https://img.shields.io/pypi/v/gevent_inotifyx)](https://pypi.python.org/pypi/gevent_inotifyx)\n\nGevent-compatible low-level inotify bindings based on [inotifyx].\n\n  - Python 2 and 3 compatible\n  - Exposes a low-level [inotify(7)][inotify] API\n  - Allows to wait for events in a non-blocking way when using [gevent].\n\n[inotify]: http://man7.org/linux/man-pages/man7/inotify.7.html\n[inotifyx]: https://launchpad.net/inotifyx/\n[gevent]: http://www.gevent.org/\n[build-status-url]: https://travis-ci.org/trendels/gevent_inotifyx\n[build-status-img]: https://travis-ci.org/trendels/gevent_inotifyx.svg\n\n## Installation\n\n    $ pip install gevent_inotifyx\n\nFrom source:\n\n    $ python setup.py install\n\nTo run the tests:\n\n    $ make test\n\n## Examples\n\nWatch a directory while creating new files. This prints\n\n    event: test.txt IN_CLOSE|IN_CLOSE_WRITE|IN_ALL_EVENTS\n\nevery second:\n\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nimport os\nimport gevent\nimport gevent_inotifyx as inotify\n\ndef create_file_events():\n    \"\"\"Open and close a file to generate inotify events.\"\"\"\n    while True:\n        with open('/tmp/test.txt', 'a'):\n            pass\n        gevent.sleep(1)\n\ndef watch_for_events():\n    \"\"\"Wait for events and print them to stdout.\"\"\"\n    fd = inotify.init()\n    try:\n        wd = inotify.add_watch(fd, '/tmp', inotify.IN_CLOSE_WRITE)\n        while True:\n            for event in inotify.get_events(fd):\n                print(\"event:\", event.name, event.get_mask_description())\n    finally:\n        os.close(fd)\n\nif __name__ == '__main__':\n    tasks = [\n        gevent.spawn(watch_for_events),\n        gevent.spawn(create_file_events),\n    ]\n    gevent.joinall(tasks)\n```\n\n## License\n\ngevent_inotifyx is licensed under the MIT License. See the included file `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendels%2Fgevent_inotifyx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendels%2Fgevent_inotifyx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendels%2Fgevent_inotifyx/lists"}