{"id":13813221,"url":"https://github.com/OpenMS/autowrap","last_synced_at":"2025-05-14T22:32:05.224Z","repository":{"id":4607182,"uuid":"5750488","full_name":"OpenMS/autowrap","owner":"OpenMS","description":"Generates Python Extension modules from Cythons PXD files","archived":false,"fork":false,"pushed_at":"2025-05-14T11:07:15.000Z","size":2383,"stargazers_count":76,"open_issues_count":49,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-14T11:53:33.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenMS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-09-10T14:25:07.000Z","updated_at":"2024-12-30T22:21:11.000Z","dependencies_parsed_at":"2023-12-08T10:36:47.909Z","dependency_job_id":"19a54a7f-c84a-4111-8e08-3cd1acc579e4","html_url":"https://github.com/OpenMS/autowrap","commit_stats":{"total_commits":631,"total_committers":26,"mean_commits":24.26923076923077,"dds":0.6545166402535658,"last_synced_commit":"35eb3ab6154b7c87337f886dec318a980cd4b431"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMS%2Fautowrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMS%2Fautowrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMS%2Fautowrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMS%2Fautowrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenMS","download_url":"https://codeload.github.com/OpenMS/autowrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239888,"owners_count":22037785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:01:08.158Z","updated_at":"2025-05-14T22:32:05.183Z","avatar_url":"https://github.com/OpenMS.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"autowrap [![build autowrap](https://github.com/OpenMS/autowrap/actions/workflows/ci-autowrap.yaml/badge.svg)](https://github.com/OpenMS/autowrap/actions/workflows/ci-autowrap.yaml) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/autowrap.svg)](https://anaconda.org/conda-forge/autowrap)\n========\n\n\n\nGenerates Python Extension modules from [Cython][] PXD files.\n\nIntroduction\n------------\n\nOne important application of [Cython][] is to wrap C++ classes for using them\nin Python. As [Cython][]s syntax is quite similar to the syntax of Python\nwriting a wrapper can be learned easily. Further [Cython][] prevents you from\nmany typical errors which might get in your way if you write such a wrapper in\nC++.\n\n\nThis wrapping process typically consist of four steps:\n\n  1. Rewrite parts of the header files of your C++ library in so called `.pxd`\n  files. These give [Cython][] information for calling the library and for\n  error checking the code written in the following step.\n\n  2. Write [Cython][] code which wraps the C++ library. This code resides in\n  one or more `.pyx` files.\n\n  3. Translate these `.pyx` files to C++ code with [Cython][].\n\n  4. Use [distutils][] to compile and link the C++ code to the final  Python\n  extension module.\n\nDepending on the size of your library step 2 can be tedious and the code will\nconsist of many similar code blocks with only minor differences.\n\nThis is where `autowrap` comes into play: `autowrap` replaces step 2 by\nanalyzing the `.pxd` files with [Cython][]s own parser and generating correct\ncode for step 3.  In order to steer and configure this process the `.pxd` files\ncan be annotated using special formatted comments. \n\nThe main work which remains is writing the `.pxd` files. This is comparable to\nthe declarations you have to provide if you use\n[SIP](http://www.riverbankcomputing.com/software/sip) or\n[SWIG](http://swig.org).\n\n\nDocumentation\n-------------\n\nWe assume that you installed `autowrap` already, so running\n\n    $ autowrap --help\n\ndoes not fail.\n\nPlease see [docs/README.md](docs/README.md) for further documentation.\n\nFeatures\n--------\n\n   - Wrapping of template classes with their public methods and\n     attributes,enums, free functions and static methods.\n\n   - Included converters from Python data types to (many) STL containers and\n     back.  As this is version 0.2, not all STL containers are supported. We\n     plan full support of nested STL containers.\n\n   - Manually written [Cython][] code can be incorporated for wrapping code\n     which `autowrap` can not handle (yet), and for enriching the API of the\n     wrapped library. As this is done by writing [Cython][] instead of C/C++\n     code, we get all benefits which [Cython][] shows compared to C/C++.\n\n     Writing a code generator for handling all thinkable APIs is hard, and\n     results in a difficult and hard to understand code base. We prefer a\n     maintainable code generator which handles 95% of all use cases, where the\n     remaining 5% are still wrapped manually.\n\n   - For achieving a pythonic API, converters for library specific data types\n     can be implemented easily.  These converters are written in Python and\n     [Cython][], not in C/C++ code using the C-API of CPython. \n\n   - `autowrap` relies on [Cython][], so we get  automatic conversion of C++\n     exceptions to Python exceptions and wrapper code with correct reference\n     counting. Using [distutils][] we do not have to care to much about the\n     build process on the targeted platform.\n\n   - Support for generating some special methods, as `__getitem__`, `__copy__`\n     and numerical comparison operators.\n\n\nCredits\n-------\n\nMany thanks go to:\n\n   - [Hannes Roest](http://github.com/hroest), ETH Zürich, for contributing new\n     ideas, patches, fruitful discussions and writing the first draft of this\n     README.\n\n   - [Lars Gustav Malmström](http://www.imsb.ethz.ch/researchgroup/malars), ETH\n     Zürich, for getting the ball rolling.\n\n   - The developers of [Cython][] for providing such a powerful and high\n     quality tool.\n\n   - Thanks to https://github.com/hendrik-cliqz for implementing the \"no-gil\" annotation.\n\n\n[Cython]: http://cython.org\n[distutils]: http://docs.python.org/2/distutils/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenMS%2Fautowrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpenMS%2Fautowrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenMS%2Fautowrap/lists"}