{"id":26959061,"url":"https://github.com/xzripper/parentheses","last_synced_at":"2026-06-09T16:01:56.071Z","repository":{"id":219447034,"uuid":"749081392","full_name":"xzripper/parentheses","owner":"xzripper","description":"Lightweight parentheses parser in Python.","archived":false,"fork":false,"pushed_at":"2024-01-27T16:35:10.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T05:17:37.299Z","etag":null,"topics":["parentheses","parser","python"],"latest_commit_sha":null,"homepage":"https://github.com/xzripper/parentheses","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/xzripper.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":"2024-01-27T14:36:36.000Z","updated_at":"2024-03-18T11:06:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"45634d78-5b2c-4c97-8562-48853f1a2bf4","html_url":"https://github.com/xzripper/parentheses","commit_stats":null,"previous_names":["xzripper/parentheses"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xzripper/parentheses","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2Fparentheses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2Fparentheses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2Fparentheses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2Fparentheses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xzripper","download_url":"https://codeload.github.com/xzripper/parentheses/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzripper%2Fparentheses/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34114437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["parentheses","parser","python"],"created_at":"2025-04-03T04:34:19.502Z","updated_at":"2026-06-09T16:01:56.047Z","avatar_url":"https://github.com/xzripper.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parentheses. V1.0.0\nLight parentheses parser in Python. ```pip install parentheses```\n\n## Types (Aliases):\n```python\nParenthesesSymbol = str\nParseFlag = int\n```\n\n## Constants:\n```python\nPARENTHESES_ALL: ParseFlag = 1\nPARENTHESES_OPEN: ParseFlag = 2\nPARENTHESES_CLOSE: ParseFlag = 3\n\nPARENTHESES_ROUND_OPEN: ParenthesesSymbol = '('\nPARENTHESES_ROUND_CLOSE: ParenthesesSymbol = ')'\n\nPARENTHESES_SQUARE_OPEN: ParenthesesSymbol = '['\nPARENTHESES_SQUARE_CLOSE: ParenthesesSymbol = ']'\n\nPARENTHESES_CURLY_OPEN: ParenthesesSymbol = '{'\nPARENTHESES_CURLY_CLOSE: ParenthesesSymbol = '}'\n\nPARENTHESES_DOUBLE_QUOTE: ParenthesesSymbol = '\"'\n\nPARENTHESES_SINGLE_QUOTE: ParenthesesSymbol = '\\''\n\nPARENTHESES_OPEN_SYMBOLS: list[ParenthesesSymbol] = [\n    PARENTHESES_ROUND_OPEN,\n    PARENTHESES_SQUARE_OPEN,\n    PARENTHESES_CURLY_OPEN\n]\n\nPARENTHESES_CLOSE_SYMBOLS: list[ParenthesesSymbol] = [\n    PARENTHESES_ROUND_CLOSE,\n    PARENTHESES_SQUARE_CLOSE,\n    PARENTHESES_CURLY_CLOSE\n]\n\nPARENTHESES_SYMBOLS = PARENTHESES_OPEN_SYMBOLS + PARENTHESES_CLOSE_SYMBOLS\n\nPARENTHESES_REGEX = r'\\(.*?\\)|\\[.*?\\]|\\{.*?\\}'\n```\n\n## \u003ccode\u003ePPString\u003c/code\u003e class:\n### \u003ccode\u003evalid_proc() -\u003e bool\u003c/code\u003e\nGet is parentheses in string valid. (Slower but gives more accurate result).\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x)').valid_proc()` =\u003e `True`\u003cbr\u003e\n`parse('(x').valid_proc()` =\u003e `False`\n\n### \u003ccode\u003evalid() -\u003e bool\u003c/code\u003e\nGet is parentheses in string valid. (Faster but gives less accurate result).\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x)').valid()` =\u003e `True`\u003cbr\u003e\n`parse('(x').valid()` =\u003e `False`\n\n### \u003ccode\u003evalid_quotes(_escaping: bool=False) -\u003e bool\u003c/code\u003e\nGet is quoted parentheses valid.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('\"x\"').valid_quotes()` =\u003e `True`\u003cbr\u003e\n`parse('\"x\\\"\"').valid_quotes(True)` =\u003e `True`\u003cbr\u003e\n`parse('\"x').valid_quotes()` =\u003e `False`\u003cbr\u003e\n`parse('\"x\\\"\"').valid_quotes()` =\u003e `False`\n\n### \u003ccode\u003ecount(flag: ParseFlag=PARENTHESES_ALL) -\u003e int\u003c/code\u003e\nCount braces in string.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x)').count()` =\u003e `2`\u003cbr\u003e\n`parse('(x)').count(PARENTHESES_OPEN)` =\u003e `1`\u003cbr\u003e\n`parse('(x)').count(PARENTHESES_CLOSE)` =\u003e `1`\n\n### \u003ccode\u003eautoclose() -\u003e str\u003c/code\u003e\nAutoclose brackets.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('{[(x').autoclose()` =\u003e `{[(x)]}`\n\n### \u003ccode\u003efind(remove_braces: bool=False) -\u003e list\u003c/code\u003e\nGet content in braces.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x) [y] {z}').find()` =\u003e `['(x)', '[y]', '{z}']`\u003cbr\u003e\n`parse('(x) [y] {z}').find(True)` =\u003e `['x', 'y', 'z']`\n\n### \u003ccode\u003eremove_braces() -\u003e str\u003c/code\u003e\nRemove braces in string.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x) [y] {z}').remove_braces()` =\u003e `'x y z'`\n\n### \u003ccode\u003eremove(keep_braces: bool=False) -\u003e str\u003c/code\u003e\nRemove everything in parentheses.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x) [y] {z}').remove()` =\u003e `'   '`\u003cbr\u003e\n`parse('(x) [y] {z}').remove(True)` =\u003e `'() [] {}'`\n\n### \u003ccode\u003eas_str() -\u003e str\u003c/code\u003e\nGet string.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('x').as_str()` =\u003e `'x'`\n\n## Global functions.\n### \u003ccode\u003eparse(string: str) -\u003e PPString\u003c/code\u003e\nParse string.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`parse('(x)')` =\u003e `PPString('x')`\n\n### \u003ccode\u003enew_parentheses_symbols(open_symbol: ParenthesesSymbol, close_symbol: ParenthesesSymbol) -\u003e None\u003c/code\u003e\nAdd new parentheses symbols.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`new_parentheses_symbols('\u003c', '\u003e')` =\u003e `None`\n\n### \u003ccode\u003eremove_parentheses_symbols(open_symbol: ParenthesesSymbol, close_symbol: ParenthesesSymbol) -\u003e None\u003c/code\u003e\nRemove parentheses symbols.\u003cbr\u003e\u003cbr\u003e\nExamples:\u003cbr\u003e\n`remove_parentheses_symbols('\u003c', '\u003e')` =\u003e `None`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzripper%2Fparentheses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxzripper%2Fparentheses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzripper%2Fparentheses/lists"}