https://github.com/shenfe/pylib
Python library template, supporting cpp extension compilation.
https://github.com/shenfe/pylib
boilerplate cpp extension lib python template
Last synced: about 2 months ago
JSON representation
Python library template, supporting cpp extension compilation.
- Host: GitHub
- URL: https://github.com/shenfe/pylib
- Owner: shenfe
- Created: 2019-03-29T17:38:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T15:27:22.000Z (about 7 years ago)
- Last Synced: 2025-01-24T10:32:44.590Z (over 1 year ago)
- Topics: boilerplate, cpp, extension, lib, python, template
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# libpy
> Python库项目模板,兼容Python2/3,支持C++扩展。
## installation
```sh
$ pip install .
```
安装后,python的site-packages目录下会多出如下文件:
```
├── libcpp.so
├── libpy/
└── libpy-x.y.z.dist-info/
```
## usage
### command line
```sh
$ libpy
$ libpy fn1 --help
$ libpy --config-json '{}' fn1
$ libpy --config-file ./demo/some-config.json fn1
$ libpy fn1 < ./demo/some-config.json
```
### python api
```py
import libpy
```