API Stub Generator 
Azure SDK API review tool is used to review all published Azure SDK APIs and this review tool works for all language format. API tool needs a stub file generated in json format with tokens to list APIs in review tool. API stub generator package is developed to create a stub file with api surface level information. Following are the main published components included in this stub file.
- Classes and module level functions
- Instance methods
- Class and Instance variables
- Properties
Steps to create API review
Following are the steps to create an API review request for python package.
- Generate stub file tokens
- Upload stub file tokens into API review portal
Generate stub File
apiview-stub-generator package is used to generate stub file tokens from either source code repo or from prebuilt wheel package. Following are the steps to generate stub file token.
Install apiview-stub-generator package. From the root of the apiview-stub-generator package, run:
pip install . --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
Run apistubgen command with source repo or whl package as parameter and this will generate a json file with tokens.
Help for apistubgen
apistubgen --pkg-path <path to package root>
This also takes an optional parameter to mention output path where json token file will be generated. If out-path is not given then file will be generated in current working directory.
apistubgen --pkg-path <path to package root> --out-path <Outpath path>
Sample:
apistubgen --pkg-path C:\git\azure-sdk-for-python\sdk\core\azure-core
apistubgen --pkg-path C:\git\azure-sdk-for-python\sdk\core\azure-core --out-path C:\out
Token file will be created with a naming convention `_python.json'
Upload token file to API review portal
- Go to
https://apiview.dev - Click on
Create review - Select generated token file and upload
Metadata
Release files for apiview-stub-generator 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apiview_stub_generator-0.3.7-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for apiview_stub_generator-0.3.7-py2.py3-none-any.whl |
Release files / apiview_stub_generator-0.3.7-py2.py3-none-any.whl
| Download URL | apiview_stub_generator-0.3.7-py2.py3-none-any.whl |
|---|---|
| Size | 49.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
312a7f1efc93130d74ef87f9f4e3d49b7f9f06d28b1d495b6c1a64dc9b575c02
|
|
BLAKE2b-256 checksum How to use checksums |
a1175450406f532ea7c6aa03afcbb202e5ee90a4908da2425a5e9458c444548e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for apiview-stub-generator 0.3.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.