{"id":17902562,"url":"https://github.com/alexey-t/pyphptree","last_synced_at":"2025-08-15T06:32:04.596Z","repository":{"id":62582522,"uuid":"133530800","full_name":"Alexey-T/pyPhpTree","owner":"Alexey-T","description":"Python module, parses PHP source and finds class/function/namespace declarations","archived":false,"fork":false,"pushed_at":"2018-08-02T06:43:12.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-28T19:53:00.189Z","etag":null,"topics":["parser-library","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alexey-T.png","metadata":{"files":{"readme":"README.rst","changelog":"history.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T14:46:54.000Z","updated_at":"2023-09-08T17:40:33.000Z","dependencies_parsed_at":"2022-11-03T21:21:55.970Z","dependency_job_id":null,"html_url":"https://github.com/Alexey-T/pyPhpTree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexey-T%2FpyPhpTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexey-T%2FpyPhpTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexey-T%2FpyPhpTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexey-T%2FpyPhpTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alexey-T","download_url":"https://codeload.github.com/Alexey-T/pyPhpTree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229897411,"owners_count":18141133,"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":["parser-library","python"],"created_at":"2024-10-28T16:36:00.780Z","updated_at":"2024-12-16T01:42:36.247Z","avatar_url":"https://github.com/Alexey-T.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyPhpTree module\n================\n\nModule for Python 3. Tiny parser of PHP source code, which finds lines\nwith class/function/namespace/trait declarations. It reads PHP code only\ninside ``\u003c? ... ?\u003e`` tags (any count of fragments in one file), and\noutside of ``/* ... */`` and ``// ...`` comments, and outside of\nsingle/double-quoted strings (multi-line strings supported, escape\nbackslash supported), and outside of heredoc/herenow blocks.\n\nAPI\n===\n\nFunction ``get_headers(filename, lines)`` finds all entities, in given\n\"lines\" list, and gets dicts:\n\n::\n\n   {\n     'line': int,      # 0-based line index, where name found\n     'col': int,       # 0-based position in line, where name found\n     'level': int,     # 0-based level of item. each item of level K+1\n                       # is nested into (nearest upper) item of level K\n     'name': str,      # name of entity\n                       # empty for anonymous funcs\n     'kind': str,      # \"class\", \"function\", \"namespace\", \"trait\"\n   }\n\nIt's generator (yield), so to get list, use ``list(get_headers(...))``.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexey-t%2Fpyphptree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexey-t%2Fpyphptree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexey-t%2Fpyphptree/lists"}