https://github.com/jon-edward/cy-stubgen
This is a tool for generating stub files from compiled Cython.
https://github.com/jon-edward/cy-stubgen
Last synced: about 2 months ago
JSON representation
This is a tool for generating stub files from compiled Cython.
- Host: GitHub
- URL: https://github.com/jon-edward/cy-stubgen
- Owner: jon-edward
- License: mit
- Created: 2025-01-02T23:37:59.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-04T03:04:47.000Z (4 months ago)
- Last Synced: 2025-01-04T04:17:31.398Z (4 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cy-stubgen
This is a script for generating stub files from compiled Cython.
This tool uses the [mypy stubgen](https://github.com/python/mypy/blob/master/mypy/stubgen.py) module to generate stub files from compiled Cython files.
The stub files are generated in the same directory as the Cython files.This is not a complete replacement for manual `.ipy` file generation, and does not support all features of the Cython compiler. However, it is a useful
script for prototyping simple Cython projects and allows most IDEs to use the stub files for type checking and autocompletion.## Usage
```bash
python -m pip install Cython mypy setuptools
```Then, move the `cy_stubgen.py` file to the root of your project directory. It can then be used as:
```python
from cy_stubgen import cy_stubgency_stubgen("test_project")
```Where `test_project` is the name of the directory containing the Cython files.