{"id":13501822,"url":"https://github.com/bndr/pycycle","last_synced_at":"2025-03-29T10:32:19.038Z","repository":{"id":37601805,"uuid":"80298238","full_name":"bndr/pycycle","owner":"bndr","description":"Tool for pinpointing circular imports in Python. Find cyclic imports in any project","archived":false,"fork":false,"pushed_at":"2022-01-15T20:44:01.000Z","size":24,"stargazers_count":324,"open_issues_count":19,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-15T09:38:46.116Z","etag":null,"topics":["cli","python","utilities"],"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/bndr.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-01-28T17:22:00.000Z","updated_at":"2024-03-15T02:12:13.000Z","dependencies_parsed_at":"2022-08-18T23:11:20.369Z","dependency_job_id":null,"html_url":"https://github.com/bndr/pycycle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bndr%2Fpycycle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bndr%2Fpycycle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bndr%2Fpycycle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bndr%2Fpycycle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bndr","download_url":"https://codeload.github.com/bndr/pycycle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222489014,"owners_count":16992470,"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":["cli","python","utilities"],"created_at":"2024-07-31T22:01:51.915Z","updated_at":"2024-10-31T21:30:23.803Z","avatar_url":"https://github.com/bndr.png","language":"Python","readme":"Pycycle: Find and fix circular imports in python projects\n=========================================================\n\n.. image:: https://img.shields.io/pypi/v/pycycle.svg\n    :target: https://pypi.python.org/pypi/pycycle\n\n.. image:: https://img.shields.io/pypi/l/pycycle.svg\n    :target: https://pypi.python.org/pypi/pycycle\n\n.. image:: https://img.shields.io/pypi/wheel/pycycle.svg\n    :target: https://pypi.python.org/pypi/pycycle\n\n.. image:: https://img.shields.io/pypi/pyversions/pipenv.svg\n    :target: https://pypi.python.org/pypi/pycycle\n\n.. image:: https://api.travis-ci.org/bndr/pycycle.svg?branch=master\n    :target: https://travis-ci.org/bndr/pycycle\n\n---------------\n\n\n**Pycycle** is an experimental project that aims to help python developers fix their circular dependencies problems.\n\n*ImportError: Cannot import name X* is a python exception that is related to the circular imports, but the exception tells nothing about where or what.\n\nThis tool automatically analyzes the imports of your projects, and looks for imports that may cause a circular dependency problem.\n\n.. image:: https://i.imgur.com/8JeLQxu.gif\n\nFeatures\n--------\n\n- **Shows you the whole chain of the circular imports.**\n- Gives you lines of code where each import is, for you to easily find and fix the problem.\n- Visualizes your imports in a graph **(Not Yet Implemented)**\n\n\n\nUsage\n-----\n\n::\n\n    $ pycycle\n    Usage: pycycle [OPTIONS] COMMAND [ARGS]...\n\n\n    Examples:\n        Get the circular imports in current project:\n        $ pycycle --here\n        Look for circular imports in another project\n        $ pycycle --source /home/user/workspace/awesome_project\n        Ignore specific directories when looking for circular import\n        $ pycycle --source /home/user/workspace/awesome_project --ignore some_dir,some_dir2\n        Get verbose output\n        $ pycycle --source /home/user/workspace/awesome_project --verbose\n\n    Options:\n      --verbose        Verbose output.\n      --here           Try to find cycles in the current project.\n      --source TEXT    Try to find cycles in the path provided.\n      --ignore TEXT    Comma separated directories that will be ignored during\n                       analysis.\n      --encoding TEXT  Change enconding with which the project is read.\n      --help           Show this message then exit.\n      --version        Show the version and exit.\n\n::\n\n    $ pycycle --here\n    Project successfully transformed to AST, checking imports for cycles..\n    Cycle Found :(\n    a_module.a_file: Line 1 -\u003e a_module.b_module.b_file: Line 1 -\u003e c_module.c_file: Line 1 -\u003e d_module.d_file: Line 1 =\u003e\u003e a_module.a_file\n    Finished.\n\n::\n\n    $ pycycle --source /Users/vkravcenko/workspace/awesome_project\n    Target source provided:/Users/vkravcenko/workspace/awesome_project\n    Project successfully transformed to AST, checking imports for cycles..\n    No worries, no cycles here!\n    If you think some cycle was missed, please open an Issue on Github.\n    Finished.\n\n\nInstallation\n------------\n\n::\n\n    $ pip install pycycle","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbndr%2Fpycycle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbndr%2Fpycycle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbndr%2Fpycycle/lists"}