{"id":26958777,"url":"https://github.com/neoapps-dev/neo-py","last_synced_at":"2025-04-03T04:30:15.068Z","repository":{"id":285297324,"uuid":"957649386","full_name":"neoapps-dev/neo-py","owner":"neoapps-dev","description":"A powerful Python utility library with retry mechanisms, concurrency helpers, and more","archived":false,"fork":false,"pushed_at":"2025-03-30T22:15:09.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T22:27:12.012Z","etag":null,"topics":[],"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/neoapps-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-03-30T21:35:13.000Z","updated_at":"2025-03-30T22:16:05.000Z","dependencies_parsed_at":"2025-03-30T22:27:15.840Z","dependency_job_id":"292b2e5a-c53f-4f96-9676-e1f6aeb5f42b","html_url":"https://github.com/neoapps-dev/neo-py","commit_stats":null,"previous_names":["neoapps-dev/neo-py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2Fneo-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2Fneo-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2Fneo-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2Fneo-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoapps-dev","download_url":"https://codeload.github.com/neoapps-dev/neo-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246938862,"owners_count":20857916,"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":[],"created_at":"2025-04-03T04:30:14.603Z","updated_at":"2025-04-03T04:30:15.055Z","avatar_url":"https://github.com/neoapps-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neo.py Utils\n\nA powerful Python utility library that helps you write more robust and efficient code.\n\n## Installation\n\n```bash\ngit clone https://github.com/neoapps-dev/neo-py\ncd neo-py\n# copy neo.py file to your project and then use it\n```\n\n## Features\n\n- **Retry Mechanisms**: Easily add retry logic to any function with configurable backoff and jitter\n- **Async Support**: Async-compatible retry for use with asyncio\n- **Performance Tools**: Memoization and timing decorators\n- **Rate Limiting**: Control how often functions can be called\n- **Validation**: Validate function arguments with custom validators\n- **Serialization**: Convenient JSON serialization helpers\n- **Concurrency**: Thread execution and chunked iterators\n- **Security**: Password hashing utilities\n\n## Usage Examples\n\n### Retry Decorator\n\n```python\nfrom neo import retry\n\n@retry(max_retries=5, delay=1, backoff_factor=2, jitter=True)\ndef unstable_network_call():\n    # code that might fail due to network issues\n    pass\n```\n\n### Async Retry\n\n```python\nfrom neo import retry_async\n\n@retry_async(max_retries=3, delay=0.5)\nasync def unstable_api_call():\n    # async code that might fail\n    pass\n```\n\n### Memoization\n\n```python\nfrom neo import memoize\n\n@memoize\ndef fibonacci(n):\n    if n \u003c= 1:\n        return n\n    return fibonacci(n-1) + fibonacci(n-2)\n```\n\n### Performance Timing\n\n```python\nfrom neo import timed\n\n@timed\ndef expensive_operation():\n    # code to time\n    pass\n```\n\n### Rate Limiting\n\n```python\nfrom neo import RateLimiter\n\nrate_limiter = RateLimiter(max_calls=100, period=60)\n\n@rate_limiter\ndef api_call():\n    # API call limited to 100 calls per minute\n    pass\n```\n\n### Argument Validation\n\n```python\nfrom neo import validate_args\n\n@validate_args(\n    user_id=lambda x: isinstance(x, int) and x \u003e 0,\n    email=lambda x: isinstance(x, str) and '@' in x\n)\ndef register_user(user_id, email, name=None):\n    # Will only execute if validators pass\n    pass\n```\n\n### Running Code in a Thread\n\n```python\nfrom neo import run_in_thread\n\n@run_in_thread\ndef background_task():\n    # code that runs in background\n    pass\n    \nthread = background_task()\nthread.join()  # Wait for completion if needed\n```\n\n### Processing Data in Chunks\n\n```python\nfrom neo import chunked\n\nfor chunk in chunked(large_list, 1000):\n    process_chunk(chunk)\n```\n\n### Password Security\n\n```python\nfrom neo import hash_password, verify_password\n\n# Hash a password\nhashed_password, salt = hash_password(\"my_secure_password\")\n\n# Later, verify it\nis_valid = verify_password(\"my_secure_password\", hashed_password, salt)\n```\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoapps-dev%2Fneo-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoapps-dev%2Fneo-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoapps-dev%2Fneo-py/lists"}