{"id":16284065,"url":"https://github.com/wichert/pybind11-example","last_synced_at":"2025-09-10T21:10:15.562Z","repository":{"id":138466599,"uuid":"110423763","full_name":"wichert/pybind11-example","owner":"wichert","description":"Example showing pybind11 with virtual functions","archived":false,"fork":false,"pushed_at":"2017-11-12T11:14:29.000Z","size":8,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-29T14:52:02.667Z","etag":null,"topics":["cpp","cpp11","example-project","pybind11","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wichert.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-11-12T10:35:08.000Z","updated_at":"2021-03-05T13:00:16.000Z","dependencies_parsed_at":"2024-07-14T14:31:35.497Z","dependency_job_id":null,"html_url":"https://github.com/wichert/pybind11-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fpybind11-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fpybind11-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fpybind11-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wichert%2Fpybind11-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wichert","download_url":"https://codeload.github.com/wichert/pybind11-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233670664,"owners_count":18711696,"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":["cpp","cpp11","example-project","pybind11","python"],"created_at":"2024-10-10T19:16:35.429Z","updated_at":"2025-01-14T01:05:11.581Z","avatar_url":"https://github.com/wichert.png","language":"Python","readme":"pybind11 example\n================\n\nThis project is an example of using `pybind11\n\u003chttp://pybind11.readthedocs.io/en/stable/\u003e`_ to expose a C++ library\nto Python. It features a number of nice-to-haves:\n\n* a ``setup.py`` file that can build and install the module following\n  standard Python practices.\n* Unit tests using `pytest \u003chttps://docs.pytest.org\u003e`_\n* Compatible with both Python 2 and Python 3\n* Standard ``.gitignore`` and ``.editorconfig`` files.\n* a README :)\n\nTo test the module do the following:\n\n.. code-block:: shell\n\n   # Create a virtual environment\n   python3 -m venv .\n   # Build and install the package\n   bin/pip install .\n   # Install pytest so we can run the tests\n   bin/pip install pytest\n\nIf you use Python 2 use ``virtualenv .`` instead of ``python3 -m venv``. You\nwill need to have `virtualenv \u003chttps://pypi.org/project/virtualenv/\u003e`_\ninstalled for that to work.\n \nYou can now run the tests to confirm everything works:\n\n.. code-block:: shell\n\n    bin/py.test -v\n    =========================== test session starts ===========================\n    platform darwin -- Python 3.6.3, pytest-3.2.3, py-1.4.34, pluggy-0.4.0 -- /Users/wichert/Development/pbt/bin/python3\n    cachedir: .cache\n    rootdir: /Users/wichert/Development/pbt, inifile: setup.cfg\n    collected 8 items\n\n    tests/test_base.py::test_can_create_base_instance PASSED\n    tests/test_base.py::test_a_getter_and_setter PASSED\n    tests/test_base.py::test_a_property PASSED\n    tests/test_base.py::test_virtual_method PASSED\n    tests/test_base.py::test_pure_virtual_not_implemented PASSED\n    tests/test_base.py::test_derived_class PASSED\n    tests/test_child.py::test_virtual_method PASSED\n    tests/test_child.py::test_pure_virtual_implementation PASSED\n\n    ======================== 8 passed in 0.02 seconds =========================\n\n\nIf you make a code change you will need to re-build and install. You can\ndo this using pip:\n\n.. code-block:: shell\n\n    bin/pip install --upgrade .\n\nor by using ``setup.py`` directly:\n\n.. code-block:: shell\n\n    bin/python setup.py install\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichert%2Fpybind11-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwichert%2Fpybind11-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwichert%2Fpybind11-example/lists"}