{"id":26978457,"url":"https://github.com/alexdemure/fastclient","last_synced_at":"2025-04-03T13:35:19.295Z","repository":{"id":285552821,"uuid":"954770651","full_name":"AlexDemure/fastclient","owner":"AlexDemure","description":"A CLI tool that generates HTTP clients from an OpenAPI specification","archived":false,"fork":false,"pushed_at":"2025-04-01T11:17:19.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"production","last_synced_at":"2025-04-01T11:43:24.341Z","etag":null,"topics":["http-client","openapi-client","python-client","python-openapi"],"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/AlexDemure.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":"2025-03-25T15:35:07.000Z","updated_at":"2025-04-01T11:17:23.000Z","dependencies_parsed_at":"2025-04-01T11:43:26.855Z","dependency_job_id":"bd6bed67-9c96-4966-a79b-cde9114217c4","html_url":"https://github.com/AlexDemure/fastclient","commit_stats":null,"previous_names":["alexdemure/fastclient"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDemure%2Ffastclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDemure%2Ffastclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDemure%2Ffastclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDemure%2Ffastclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexDemure","download_url":"https://codeload.github.com/AlexDemure/fastclient/tar.gz/refs/heads/production","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247010430,"owners_count":20868705,"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":["http-client","openapi-client","python-client","python-openapi"],"created_at":"2025-04-03T13:35:18.728Z","updated_at":"2025-04-03T13:35:19.278Z","avatar_url":"https://github.com/AlexDemure.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/AlexDemure/fastgenerator\"\u003e\n    \u003ca href=\"https://ibb.co/v4xr5yXd\"\u003e\u003cimg src=\"https://i.ibb.co/JjRbL63p/Frame-1349-3.png\" alt=\"Frame-1349-3\" border=\"0\"\u003e\u003c/a\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A CLI tool that generates HTTP clients from an OpenAPI specification.\n\u003c/p\u003e\n\n---\n\n## Installation\n\n```\npip install fastclientoas\n```\n\n## Usage\n\nRun the code generation process:\n\n```sh\nfastclient --file {config.toml} --context \"{}\"\n```\n\n\n## Configuration File Guide\n\nFastclient uses a structured TOML configuration file.\n\n### General Structure\n\n```\nworkdir = \"myproject\"\n\n[[clients]]\npath = \"{{name}}.py\"\ncontent = \"file:openapi.json\"\nmodel = \"pydantic\"\nasync = true\noperations = []\n\n[[scripts]]\ncommand = \"isort {{workdir}}\"\ncheck = true\n```\n\n### Sections Overview\n\n| Section       | Format                               | Description                                                              |   |   |\n|---------------|--------------------------------------|--------------------------------------------------------------------------|---|---|\n| `workdir`     | `\"\"`                                 | Uses the current directory                                               |   |   |\n|               | `\"myproject\"`                        | Uses the current directory + `/myproject`                                |   |   |\n|               | `\"/home/myproject\"`                  | Uses an absolute path                                                    |   |   |\n| `[[clients]]` |                                      | Defines file creation rules                                              |   |   |\n|               | `mode = \"a\"`                         | File writing mode: `\"a\"` (append), `\"w\"` (overwrite)                     |   |   |\n|               | `path = \"src/__init__.py\"`           | Relative to workdir, specifies file location.                            |   |   |\n|               | `content = \"\"\" ... \"\"\" / path / url` | Raw content, local file path, or URL for remote content.                 |   |   |\n|               | `model = \"pydantic\"`                 | Type of models created                                                   |   |   |\n|               | `async = \"true\"`                     | Type of methods                                                          |   |   |\n|               | `operations = []`                    | Filtering methods by operation_id                                        |   |   |\n| `[[scripts]]` |                                      | Defines commands to be executed after generation.                        |   |   |\n|               | `command = \"isort {{workdir}}\"`      | Command to execute, supports dynamic variables.                          |   |   |\n|               | `check = True\\False\"`                | If true, raises an error if the command fails, otherwise logs output.    |   |   |\n\n\n## Using Dynamic Variables\n\nFastclient supports dynamic variables in both file paths, contents, and script commands.\n\n```toml\n[[clients]]\npath = \"src/{{name}}.py\n```\n\n## Automating Post-Generation Tasks\n\nFastclient allows you to execute scripts after generating files. These scripts can perform tasks such as formatting, linting, or additional file modifications.\n\n#### Example\n```\n[[scripts]]\ncommand = \"isort {{workdir}}\"\ncheck = true\n\n[[scripts]]\ncommand = \"ruff {{workdir}} --fix\"\ncheck = false\n```\n\n- Commands support dynamic variables.\n- If check = true, the execution will fail if the command returns a non-zero exit code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdemure%2Ffastclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdemure%2Ffastclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdemure%2Ffastclient/lists"}