cythonbuilder


Namecythonbuilder JSON
Version 0.1.20 PyPI version JSON
download
home_page
SummaryCythonBuilder; automated compiling and packaging of Cython code
upload_time2023-06-12 08:46:20
maintainer
docs_urlNone
authorMike Huls
requires_python>=3.9,<4.0
licenseMIT
keywords pypi cython setup packaging compilation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # CythonBuilder
CythonBuilder; automated compiling and packaging of Cython code

<table>
    <tr>
        <th>Version</th>
        <td>
            <a href="https://pypi.org/project/cythonbuilder">
                <img alt="version" src="https://img.shields.io/pypi/v/cythonbuilder">
            </a>
        </td>
    </tr>
    <tr>
        <th>Package</th>
        <td>
            <a href="https://pypi.org/project/cythonbuilder">
                <img alt="PythonVersion" src="https://img.shields.io/pypi/pyversions/cythonbuilder">
            </a>
            <a href="https://pypi.org/project/cythonbuilder">
                <img alt="Platform" src="https://img.shields.io/badge/os-windows%20%7C%20linux-blue">
            </a>
            <a href="https://github.com/mike-huls/cythonbuilder/blob/main/license.txt">
                <img alt="License" src="https://img.shields.io/pypi/l/cythonbuilder">
            </a>
            <a href="https://cython.org/">
                <img alt="implementation" src="https://img.shields.io/pypi/implementation/cythonbuilder">
            </a>
        </td>
    </tr>
    <tr>
        <th>Status</th>
        <td>
            <a href="https://pypi.org/project/cythonbuilder">
                <img alt="status" src="https://img.shields.io/pypi/status/cythonbuilder">
            </a>
            <a href="https://pypi.org/project/cythonbuilder">
                <img alt="DependencyStatus" src="https://img.shields.io/librariesio/release/pypi/cythonbuilder">
            </a>
            <a>
                <img alt="CoverageStatus" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mike-huls/cythonbuilder/main/stats/coverage.json">
            </a>
        </td>
    </tr>
    <tr>
        <th>Stats</th>
        <td>
            <a href="https://pypi.org/project/cythonbuilder/">
                <img alt="DownloadsCount" src="https://img.shields.io/pypi/dm/cythonbuilder">
            </a>
        </td>
    </tr>
    <tr>
        <th>Social</th>
        <td>
            <a href="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fmike-huls%2Fcythonbuilder">
                <img alt="tweet" src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fmike-huls%2Fcythonbuilder">
            </a>
            <a href="https://img.shields.io/twitter/follow/mike_huls?style=social">
                <img alt="twitterfollow" src="https://img.shields.io/twitter/follow/mike_huls?style=social">
            </a>
        </td>
    </tr>
</table>


## Installation
```commandline
pip install cythonbuilder
```

## How to use
CythonBuilder makes it easy to use Cython in your Python project by automating the building process.
You can use CythonBuilder from the commandline or import it as a package in Python. 
Generated files can be imported in Python directly


### With Commandline
Add `-v` (verbose) for more information 
1. Listing files with and without filter
```commandline
cybuilder list
cybuilder list --files file1 file2.pyx
```

2. Build with and without optional build arguments 
```commandline
cybuilder build
cybuilder build --include-numpy --no-annotation --no-cleanup
```

3. Clean
```commandline
cybuilder clean 
cybuilder clean --no-cleanup
```

<hr>

### With python
1. Listing files with and without filter

```python

from cythonbuilderr import cythonbuilder as cybuilder

print(cybuilder.cy_list())  # without a filter
print(cybuilder.cy_list(target_files=['some_name.pyx']))  # with a filter
```

2. Build with and without optional build arguments  (cleans automatically afterwards)

```python

from src import cythonbuilder as cybuilder

cybuilder.cy_build()

found_files = cybuilder.cy_build(target_files=['some_name'])
cybuilder.cy_build(target_files=found_files, include_numpy=False, create_annotations=False)
```

3. Clean

```python

from src import cythonbuilder as cybuilder

cybuilder.cy_clean()

found_files = cybuilder.cy_build(target_files=['some_name'])
cybuilder.cy_clean(target_files=['some_name'])
```

4. Setting debug level for verbose logging

```python
from cythonbuilderr import logger
from cythonbuilderr import set_logger_debug_mode

set_logger_debug_mode(logger=logger)
```

### In-depth, step by step Explanation
I've written a few articles that explain why Python is slow, why Cython can be a solution and how CythonBuilder helps us develop fast code easily:
- [Why Python is so slow and how to speed it up](https://mikehuls.medium.com/why-is-python-so-slow-and-how-to-speed-it-up-485b5a84154e)
- [Getting started with Cython; how to perform >1.7 billion calculations per second with Python](https://mikehuls.medium.com/getting-started-with-cython-how-to-perform-1-7-billion-calculations-per-second-in-python-b83374cfcf77)
- [Cython for data science: 6 steps to make this Pandas dataframe operation over 100x faster](https://mikehuls.medium.com/cython-for-data-science-6-steps-to-make-this-pandas-dataframe-operation-over-100x-faster-1dadd905a00b)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cythonbuilder",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "pypi,Cython,setup,packaging,compilation",
    "author": "Mike Huls",
    "author_email": "m.huls@datanext.nl",
    "download_url": "https://files.pythonhosted.org/packages/4b/c7/7c6008741b5c4bf498f5648a232fffaa2d2b7fdd0d0679d936c2a6adaf7f/cythonbuilder-0.1.20.tar.gz",
    "platform": null,
    "description": "# CythonBuilder\nCythonBuilder; automated compiling and packaging of Cython code\n\n<table>\n    <tr>\n        <th>Version</th>\n        <td>\n            <a href=\"https://pypi.org/project/cythonbuilder\">\n                <img alt=\"version\" src=\"https://img.shields.io/pypi/v/cythonbuilder\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <th>Package</th>\n        <td>\n            <a href=\"https://pypi.org/project/cythonbuilder\">\n                <img alt=\"PythonVersion\" src=\"https://img.shields.io/pypi/pyversions/cythonbuilder\">\n            </a>\n            <a href=\"https://pypi.org/project/cythonbuilder\">\n                <img alt=\"Platform\" src=\"https://img.shields.io/badge/os-windows%20%7C%20linux-blue\">\n            </a>\n            <a href=\"https://github.com/mike-huls/cythonbuilder/blob/main/license.txt\">\n                <img alt=\"License\" src=\"https://img.shields.io/pypi/l/cythonbuilder\">\n            </a>\n            <a href=\"https://cython.org/\">\n                <img alt=\"implementation\" src=\"https://img.shields.io/pypi/implementation/cythonbuilder\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <th>Status</th>\n        <td>\n            <a href=\"https://pypi.org/project/cythonbuilder\">\n                <img alt=\"status\" src=\"https://img.shields.io/pypi/status/cythonbuilder\">\n            </a>\n            <a href=\"https://pypi.org/project/cythonbuilder\">\n                <img alt=\"DependencyStatus\" src=\"https://img.shields.io/librariesio/release/pypi/cythonbuilder\">\n            </a>\n            <a>\n                <img alt=\"CoverageStatus\" src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mike-huls/cythonbuilder/main/stats/coverage.json\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <th>Stats</th>\n        <td>\n            <a href=\"https://pypi.org/project/cythonbuilder/\">\n                <img alt=\"DownloadsCount\" src=\"https://img.shields.io/pypi/dm/cythonbuilder\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <th>Social</th>\n        <td>\n            <a href=\"https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fmike-huls%2Fcythonbuilder\">\n                <img alt=\"tweet\" src=\"https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fmike-huls%2Fcythonbuilder\">\n            </a>\n            <a href=\"https://img.shields.io/twitter/follow/mike_huls?style=social\">\n                <img alt=\"twitterfollow\" src=\"https://img.shields.io/twitter/follow/mike_huls?style=social\">\n            </a>\n        </td>\n    </tr>\n</table>\n\n\n## Installation\n```commandline\npip install cythonbuilder\n```\n\n## How to use\nCythonBuilder makes it easy to use Cython in your Python project by automating the building process.\nYou can use CythonBuilder from the commandline or import it as a package in Python. \nGenerated files can be imported in Python directly\n\n\n### With Commandline\nAdd `-v` (verbose) for more information \n1. Listing files with and without filter\n```commandline\ncybuilder list\ncybuilder list --files file1 file2.pyx\n```\n\n2. Build with and without optional build arguments \n```commandline\ncybuilder build\ncybuilder build --include-numpy --no-annotation --no-cleanup\n```\n\n3. Clean\n```commandline\ncybuilder clean \ncybuilder clean --no-cleanup\n```\n\n<hr>\n\n### With python\n1. Listing files with and without filter\n\n```python\n\nfrom cythonbuilderr import cythonbuilder as cybuilder\n\nprint(cybuilder.cy_list())  # without a filter\nprint(cybuilder.cy_list(target_files=['some_name.pyx']))  # with a filter\n```\n\n2. Build with and without optional build arguments  (cleans automatically afterwards)\n\n```python\n\nfrom src import cythonbuilder as cybuilder\n\ncybuilder.cy_build()\n\nfound_files = cybuilder.cy_build(target_files=['some_name'])\ncybuilder.cy_build(target_files=found_files, include_numpy=False, create_annotations=False)\n```\n\n3. Clean\n\n```python\n\nfrom src import cythonbuilder as cybuilder\n\ncybuilder.cy_clean()\n\nfound_files = cybuilder.cy_build(target_files=['some_name'])\ncybuilder.cy_clean(target_files=['some_name'])\n```\n\n4. Setting debug level for verbose logging\n\n```python\nfrom cythonbuilderr import logger\nfrom cythonbuilderr import set_logger_debug_mode\n\nset_logger_debug_mode(logger=logger)\n```\n\n### In-depth, step by step Explanation\nI've written a few articles that explain why Python is slow, why Cython can be a solution and how CythonBuilder helps us develop fast code easily:\n- [Why Python is so slow and how to speed it up](https://mikehuls.medium.com/why-is-python-so-slow-and-how-to-speed-it-up-485b5a84154e)\n- [Getting started with Cython; how to perform >1.7 billion calculations per second with Python](https://mikehuls.medium.com/getting-started-with-cython-how-to-perform-1-7-billion-calculations-per-second-in-python-b83374cfcf77)\n- [Cython for data science: 6 steps to make this Pandas dataframe operation over 100x faster](https://mikehuls.medium.com/cython-for-data-science-6-steps-to-make-this-pandas-dataframe-operation-over-100x-faster-1dadd905a00b)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CythonBuilder; automated compiling and packaging of Cython code",
    "version": "0.1.20",
    "project_urls": {
        "Bug Tracker": "https://github.com/mike-huls/cythonbuilder/issues",
        "Documentation": "https://github.com/mike-huls/cythonbuilder/blob/main/README.md/",
        "Homepage": "https://github.com/mike-huls/cythonbuilder",
        "Say Thanks!": "https://www.buymeacoffee.com/mikehuls",
        "Source": "https://github.com/mike-huls/cythonbuilder/"
    },
    "split_keywords": [
        "pypi",
        "cython",
        "setup",
        "packaging",
        "compilation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a76889854adb757a441e14749aac84d86d250f37718b392dd98bc69f7e366b2b",
                "md5": "c66a0a87cde26650cb3090b3b6f3bf10",
                "sha256": "46b528c9cbf3410fbd2712e861373cff10a1f5703c281a5b199be60506da728b"
            },
            "downloads": -1,
            "filename": "cythonbuilder-0.1.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c66a0a87cde26650cb3090b3b6f3bf10",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 14710,
            "upload_time": "2023-06-12T08:46:19",
            "upload_time_iso_8601": "2023-06-12T08:46:19.251754Z",
            "url": "https://files.pythonhosted.org/packages/a7/68/89854adb757a441e14749aac84d86d250f37718b392dd98bc69f7e366b2b/cythonbuilder-0.1.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4bc77c6008741b5c4bf498f5648a232fffaa2d2b7fdd0d0679d936c2a6adaf7f",
                "md5": "472ce6cbb2cfc203b745254eeb2e6748",
                "sha256": "159a96b2cb3e5a16ab646b19e5c55021e506911b26761080f9a0c97bf2bdc50a"
            },
            "downloads": -1,
            "filename": "cythonbuilder-0.1.20.tar.gz",
            "has_sig": false,
            "md5_digest": "472ce6cbb2cfc203b745254eeb2e6748",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 12358,
            "upload_time": "2023-06-12T08:46:20",
            "upload_time_iso_8601": "2023-06-12T08:46:20.511781Z",
            "url": "https://files.pythonhosted.org/packages/4b/c7/7c6008741b5c4bf498f5648a232fffaa2d2b7fdd0d0679d936c2a6adaf7f/cythonbuilder-0.1.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-12 08:46:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mike-huls",
    "github_project": "cythonbuilder",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "lcname": "cythonbuilder"
}
        
Elapsed time: 0.09319s