{"id":29572768,"url":"https://github.com/maxblee/force_deps","last_synced_at":"2025-07-19T05:11:18.580Z","repository":{"id":57431859,"uuid":"209233290","full_name":"maxblee/force_deps","owner":"maxblee","description":"A small package for enforcing package requirements at the class- or function-level.","archived":false,"fork":false,"pushed_at":"2019-09-18T08:26:13.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T08:05:55.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/maxblee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-18T06:22:15.000Z","updated_at":"2019-09-18T08:26:15.000Z","dependencies_parsed_at":"2022-09-02T10:52:41.275Z","dependency_job_id":null,"html_url":"https://github.com/maxblee/force_deps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxblee/force_deps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxblee%2Fforce_deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxblee%2Fforce_deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxblee%2Fforce_deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxblee%2Fforce_deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxblee","download_url":"https://codeload.github.com/maxblee/force_deps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxblee%2Fforce_deps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265419189,"owners_count":23761841,"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-07-19T05:11:18.074Z","updated_at":"2025-07-19T05:11:18.572Z","avatar_url":"https://github.com/maxblee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"force-dependencies\n===============================\n\nversion number: \"0.1.0\"\nauthor: Max Lee\n\n[![Build Status](https://travis-ci.org/maxblee/force_deps.svg?branch=master)](https://travis-ci.org/maxblee/force_deps) [![Coverage Status](https://coveralls.io/repos/github/maxblee/force_deps/badge.svg?branch=master)](https://coveralls.io/github/maxblee/force_deps?branch=master)\n\nOverview\n--------\n\n`force-dependencies` is a small package for enforcing package requirements at the class- or function-level.\n\nSimply use:\n\n```python\nfrom force_deps import requires, requires_any, requires_all\n\n@requires(\"sqlalchemy\")\nclass SQLHandler(object):\n    def __init__(self):\n        pass\n\ndb = SQLHandler()\nTraceback (most recent call last):\n    ...\nImportError: You must import `sqlalchemy` in order to run `SQLHandler`\n```\nto require users to have a package installed in order to use your class or function,\n\n```python\n@requires_any([\"sqlalchemy\", \"sqlite3\"])\n...\n```\nto require that users have at least one of a number of packages installed, or\n\n```python\n@requires_all([\"sqlalchemy\", \"pandas\"])\n...\n```\nto require that users have all of a number of packages installed in order to use a class or function.\n\nFinally, you can combine the decorators together in pretty much any way you please:\n```python\n@requires_any([\"sqlalchemy\", \"sqlite3\"])\n@requires(\"pandas\")\n...\n```\n\nInstallation / Usage\n--------------------\n\nThis library requires Python\u003e=3.5. You should be able to extend its compatibility by removing the dependencies\non Python's `typing` libraries.\n\nTo install use pip:\n\n    $ pip install force_deps\n\n\nOr clone the repo:\n```shell\n    $ git clone https://github.com/maxblee/force_deps.git\n    $ python setup.py install\n```\n\nProject template based off [this minimal Python cookiecutter template](https://github.com/wdm0006/cookiecutter-pipproject).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxblee%2Fforce_deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxblee%2Fforce_deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxblee%2Fforce_deps/lists"}