
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@typespec/http-client-python
Advanced tools
Follow TypeSpec Getting Started to initialize your TypeSpec project.
Make sure npx tsp compile . runs correctly.
@typespec/http-client-python to your projectInclude @typespec/http-client-python in package.json:
"dependencies": {
+ "@typespec/http-client-python": "latest"
},
Run npm install to install the dependency.
You can either specify @typespec/http-client-python on the commandline or through tspconfig.yaml.
--emit commandRun command npx tsp compile --emit @typespec/http-client-python <path-to-typespec-file>
e.g.
npx tsp compile main.tsp --emit @typespec/http-client-python
or
npx tsp compile client.tsp --emit @typespec/http-client-python
Add the following configuration in tspconfig.yaml:
emit:
- "@typespec/http-client-python"
options:
"@typespec/http-client-python":
+ package-dir: "contoso"
+ package-name: "contoso"
Run the command to generate your library:
npx tsp compile main.tsp
or
npx tsp compile client.tsp
You can further configure the generated client library using the emitter options provided through @typespec/http-client-python.
You can set options in the command line directly via --option @typespec/http-client-python.<optionName>=XXX, e.g. --option @typespec/http-client-python.package-name="contoso"
or
Modify tspconfig.yaml in the TypeSpec project to add emitter options under options/@typespec/http-client-python.
emit:
- "@typespec/http-client-python"
options:
"@typespec/http-client-python":
+ package-dir: "{package-dir}"
+ package-name: "contoso"
Common emitter configuration example:
emit:
- "@typespec/http-client-python"
options:
"@typespec/http-client-python":
package-dir: "{package-dir}"
package-name: "contoso"
| Option | Type | Description |
|---|---|---|
package-version | string | Specify the package version. Default version: 1.0.0b1. |
package-name | string | Specify the package name. |
package-dir | string | Specify the output directory for the package. |
generate-packaging-files | boolean | Indicate if packaging files, such as setup.py, should be generated. |
package-pprint-name | string | Specify the pretty print name for the package. |
flavor | string | Represents the type of SDK that will be generated. By default, there will be no branding in the generated client library. Specify "azure" to generate an SDK following Azure guidelines. |
company-name | string | Specify the company name to be inserted into licensing data. For "azure" flavor, the default value inserted is Microsoft. |
Advanced emitter options
| Option | Type | Description |
|---|---|---|
head-as-boolean | boolean | Generate head calls to return a boolean. Default: true. |
packaging-files-dir | string | Pass in the path to a custom directory with SDK packaging files. |
packaging-files-config | object | Specify configuration options that will be passed directly into the packaging files specified by the packaging-files-dir option. |
tracing | boolean | Only available for the "azure" flavor of SDKs, provide tracing support in the generated client library. Default: true. |
debug | boolean | Enable debugging. |
FAQs
TypeSpec emitter for Python SDKs
The npm package @typespec/http-client-python receives a total of 2,214 weekly downloads. As such, @typespec/http-client-python popularity was classified as popular.
We found that @typespec/http-client-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.