{"id":16570989,"url":"https://github.com/opalmer/pywincffi","last_synced_at":"2025-08-09T06:13:30.402Z","repository":{"id":57458524,"uuid":"37441228","full_name":"opalmer/pywincffi","owner":"opalmer","description":"A Python library which wraps Windows functions using CFFI.","archived":false,"fork":false,"pushed_at":"2018-01-13T18:19:24.000Z","size":933,"stargazers_count":9,"open_issues_count":9,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T22:48:17.857Z","etag":null,"topics":["cffi","cffi-wrappers-for-win32-api","python","win32","winapi","windows"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opalmer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-15T03:24:57.000Z","updated_at":"2024-06-24T19:31:35.000Z","dependencies_parsed_at":"2022-09-09T23:02:40.796Z","dependency_job_id":null,"html_url":"https://github.com/opalmer/pywincffi","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/opalmer/pywincffi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opalmer%2Fpywincffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opalmer%2Fpywincffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opalmer%2Fpywincffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opalmer%2Fpywincffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opalmer","download_url":"https://codeload.github.com/opalmer/pywincffi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opalmer%2Fpywincffi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269538725,"owners_count":24434549,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cffi","cffi-wrappers-for-win32-api","python","win32","winapi","windows"],"created_at":"2024-10-11T21:20:47.280Z","updated_at":"2025-08-09T06:13:30.339Z","avatar_url":"https://github.com/opalmer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python Windows Wrapper Using CFFI\n=================================\n\n.. image:: https://ci.appveyor.com/api/projects/status/dl0ec1fny9keo61c/branch/master?svg=true\n    :target: https://ci.appveyor.com/project/opalmer/pywincffi/history\n    :alt: build status\n\n.. image:: https://travis-ci.org/opalmer/pywincffi.png?branch=master\n    :target: https://travis-ci.org/opalmer/pywincffi\n    :alt: build status (pylint and pep8)\n\n.. image:: https://codecov.io/github/opalmer/pywincffi/coverage.svg?branch=master\n    :target: https://codecov.io/github/opalmer/pywincffi?branch=master\n    :alt: code coverage\n\n.. image:: https://readthedocs.org/projects/pywincffi/badge/?version=0.4.0\n    :target: https://pywincffi.readthedocs.org/\n    :alt: documentation badge\n\n\n``pywincffi`` is a wrapper around some Windows API functions using Python\nand the `cffi \u003chttps://cffi.readthedocs.org\u003e`_ library.  This project was\noriginally created to assist the Twisted project in moving away from its\ndependency on ``pywin32``.  Contributions to expand on the APIs which pywincffi\noffers are always welcome however.\n\nThe core objectives and design principles behind this project are:\n\n    * It should be easier to to use Windows API functions both in terms of\n      implementation and distribution.\n    * Python 2.7 and 3.x should be supported from a single code base and\n      not require a consumer of pywincffi to worry about how they use the\n      library.\n    * Type conversion, error checking and other 'C like' code should be the\n      responsibility of the library where possible.\n    * APIs provided by pywincffi should mirror their Windows counterparts as\n      closely as possible so the MSDN documentation can be more easily used as\n      reference.\n    * Documentation and error messages should be descriptive, consistent,\n      complete and accessible.  Examples should be provided for more complex\n      use cases.\n    * For contributors, it should be possible to develop and test regardless\n      of what platform the contributor is coming from.\n\n\nDevelopment\n===========\n\nThis section gives a basic overview of the development process including\nthe major goals.  This is not comprehensive but should be a good\nintroduction before submitting a pull request.\n\nSupport and Documentation\n-------------------------\n\nBesides this readme there are two other locations you can go to receive some\nhelp:\n\n    * https://pywincffi.readthedocs.org/en/latest/dev/ - Goes beyond\n      what's in this readme.\n    * https://groups.google.com/forum/#!forum/pywincffi - Google group for\n      discussions, questions, etc.\n\nPython Version Support\n----------------------\n\nThis project supports Python 2.7 and up including Python 3.x.  PRs, patches,\ntests etc that don't include support for both 2.x and 3.x will not be\nmerged.  The aim is also the support both major versions of Python within\nthe same code base rather than rely on tools such as 2to3, six or other\nlibraries for the most part.\n\nDocumentation\n-------------\n\nThe documentation for this this library is hosted on\n`Read The Docs \u003chttps://pywincffi.readthedocs.org/\u003e`_.\nIt's generated directly from this library using sphinx::\n\n    virtualenv env\n    env/bin/activate\n    pip install -r dev_requirements.txt\n    pip install -e .\n    cd docs\n    make html\n\nThe build process also builds the documentation to ensure there are not\nany obvious problems (including broken links).\n\nFunction Documentation\n~~~~~~~~~~~~~~~~~~~~~~\n\nWindows API Functions are typically documented in the following format:\n\n.. code-block:: python\n\n    def DuplicateHandle(arg1, kwarg1=None):\n        \"\"\"\n        A brief message about this function.\n\n        .. seealso::\n\n            \u003curl to the MSDN API documentation for this function\u003e\n\n        :param type arg1:\n            Brief information about this argument\n\n        :keyword type kwarg1:\n            Brief information about this keyword include it's default\n            and how it's handled within the function.\n\n        :raises SomeException:\n            Some information on when this exception will be raised\n\n        :rtype: type\n        :return:\n            Information about the data that's returned\n        \"\"\"\n\nIt's important to note that the docs contain a ``seealso`` stanza.  This is\ntypically used to reference the MSDN documentation but may also be used to\nreference examples, white papers or other reference which may be useful in\ndescribing the function.\n\nAdding new functions is covered in greater detail\n`here \u003chttps://pywincffi.readthedocs.org/en/latest/dev/functions.html\u003e`_\n\n\nTesting\n-------\n\nContinuous Integration\n~~~~~~~~~~~~~~~~~~~~~~\n\nTo consistently ensure the highest quality code, the following services are\nutilized to test or analyze every commit and pull request:\n\n    * `AppVeyor \u003chttps://ci.appveyor.com/project/opalmer/pywincffi\u003e`_ - Runs\n      the unittests, builds wheel files, MSIs and other output artifacts\n      which can be published in a release.\n    * `Travis \u003chttps://travis-ci.org/opalmer/pywincffi\u003e`_ - Runs the ``pep8``\n      and ``pylint`` command line tools on the code base and tests.  This also\n      builds the docs so documentation problems are easily spotted.\n    * `Codecov \u003chttps://codecov.io/github/opalmer/pywincffi\u003e`_ - Analyses and\n      displays code coverage results after tests have run on AppVeyor.  Results\n      are posted back to pull requests.\n    * `ReadTheDocs \u003chttps://readthedocs.org/projects/pywincffi/builds/\u003e`_. -\n      The official location where documentation is built and posted.  This is\n      generally for merges into the master branch however.\n\nAdditional Testing\n~~~~~~~~~~~~~~~~~~\n\nAs seen above, there are numerous tests besides the unittests.  To run all\nthe tests on Windows, much like the continuous integration systems do, you can\nrun ``test.bat``:\n\n.. code-block:: console\n\n    \u003e check.bat\n\nThis will:\n\n* Check code style for both the library and tests.\n* Run all unittests.\n* Build the wheel file.\n* Build the documentation and treat warnings as errors.\n\nKeep in mind that this will not setup the virtualenv or build environment for\nyou.  So if you can't build the library or are missing a dependency then\nthe above may fail.\n\n\nVagrant\n~~~~~~~\n\nThe continuous integration services above negate most of the need to setup\nyour local workstation to handle development for pywincffi, even if you're not\nrunning Windows.  In some cases however it can be faster or easiear to work\non your local machine.\n\nIf you're not running Windows or you don't have the tools necessary to\ndevelop pywincffi on your machine you can use\n`Vagrant \u003chttps://www.vagrantup.com/\u003e`_ to build a Windows machine and start\ndeveloping.  There's a more in depth explanation of this process located\nhere:\n\n    https://pywincffi.readthedocs.org/en/latest/dev/vagrant.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopalmer%2Fpywincffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopalmer%2Fpywincffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopalmer%2Fpywincffi/lists"}