
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm 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,587 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.