{"id":14986689,"url":"https://github.com/manchenkoff/openapi3-parser","last_synced_at":"2025-05-16T11:05:58.894Z","repository":{"id":37718084,"uuid":"290637240","full_name":"manchenkoff/openapi3-parser","owner":"manchenkoff","description":"OpenAPI 3 parser to use a specification inside of the code in your projects","archived":false,"fork":false,"pushed_at":"2025-03-24T11:35:55.000Z","size":340,"stargazers_count":79,"open_issues_count":21,"forks_count":36,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T17:02:46.361Z","etag":null,"topics":["openapi","openapi-specification","openapi3","parser","python3","swagger"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/openapi3-parser/","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/manchenkoff.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"manchenkoff","buy_me_a_coffee":"manchenkoff","thanks_dev":"manchenkoff"}},"created_at":"2020-08-27T00:47:00.000Z","updated_at":"2025-04-18T09:37:37.000Z","dependencies_parsed_at":"2023-11-23T10:24:04.000Z","dependency_job_id":"70059fc1-fca9-4547-90a4-c2eaf533b542","html_url":"https://github.com/manchenkoff/openapi3-parser","commit_stats":{"total_commits":137,"total_committers":14,"mean_commits":9.785714285714286,"dds":0.5109489051094891,"last_synced_commit":"c8b1d0c207cce6ce835a06daebf0476ed84e1f1f"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manchenkoff%2Fopenapi3-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manchenkoff%2Fopenapi3-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manchenkoff%2Fopenapi3-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manchenkoff%2Fopenapi3-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manchenkoff","download_url":"https://codeload.github.com/manchenkoff/openapi3-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"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":["openapi","openapi-specification","openapi3","parser","python3","swagger"],"created_at":"2024-09-24T14:13:21.580Z","updated_at":"2025-05-16T11:05:53.883Z","avatar_url":"https://github.com/manchenkoff.png","language":"Python","readme":"# OpenAPI Parser\n\n![PyPI - Version](https://img.shields.io/pypi/v/openapi3-parser)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/openapi3-parser)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openapi3-parser)\n![PyPI - Format](https://img.shields.io/pypi/format/openapi3-parser)\n![PyPI - License](https://img.shields.io/pypi/l/openapi3-parser)\n\nA simple package to parse your OpenAPI 3 documents into Python object to work with.\n\nSupported versions:\n\n| Version | Status         |\n| ------- | -------------- |\n| 2.0     | Deprecated     |\n| 3.0     | **Supported**  |\n| 3.1     | In development |\n\n## How to install\n\nTo install package run the following command\n\n```\npip install openapi3-parser\n```\n\n## How to use\n\nExample of parser usage\n\n```\n\u003e\u003e\u003e from openapi_parser import parse\n\u003e\u003e\u003e content = parse('swagger.yml')\n\u003e\u003e\u003e print(content)\n```\n\nGet application servers\n\n```python\nfrom openapi_parser import parse\n\nspecification = parse('data/swagger.yml')\n\nprint(\"Application servers\")\n\nfor server in specification.servers:\n    print(f\"{server.description} - {server.url}\")\n\n# Output\n#\n# \u003e\u003e Application servers\n# \u003e\u003e production - https://users.app\n# \u003e\u003e staging - http://stage.users.app\n# \u003e\u003e development - http://users.local\n```\n\nGet list of application URLs\n\n```python\nfrom openapi_parser import parse\n\nspecification = parse('tests/data/swagger.yml')\n\nurls = [x.url for x in specification.paths]\n\nprint(urls)\n\n# Output\n#\n# \u003e\u003e ['/users', '/users/{uuid}']\n```\n\nGet operation with supported HTTP methods\n\n```python\nfrom openapi_parser import parse\n\nspecification = parse('tests/data/swagger.yml')\n\nfor path in specification.paths:\n    supported_methods = ','.join([x.method.value for x in path.operations])\n\n    print(f\"Operation: {path.url}, methods: {supported_methods}\")\n\n# Output\n#\n# \u003e\u003e Operation: /users, methods: get,post\n# \u003e\u003e Operation: /users/{uuid}, methods: get,put\n```\n","funding_links":["https://github.com/sponsors/manchenkoff","https://buymeacoffee.com/manchenkoff","https://thanks.dev/manchenkoff"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanchenkoff%2Fopenapi3-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanchenkoff%2Fopenapi3-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanchenkoff%2Fopenapi3-parser/lists"}