This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python Windows Wrapper Using CFFI

pywincffi is a wrapper around some Windows API functions using Python and the cffi library. This project was originally created to assist the Twisted project in moving away from its dependency on pywin32. Contributions to expand on the APIs which pywincffi offers are always welcome however.

The core objectives and design principles behind this project are:

  • It should be easier to to use Windows API functions both in terms of implementation and distribution.
  • Python 2.6, 2.7 and 3.x should be supported from a single code base and not require a consumer of pywincffi to worry about how they use the library.
  • Type conversion, error checking and other ‘C like’ code should be the responsibility of the library where possible.
  • APIs provided by pywincffi should mirror their Windows counterparts as closely as possible so the MSDN documentation can be more easily used as reference.
  • Documentation and error messages should be descriptive, consistent, complete and accessible. Examples should be provided for more complex use cases.
  • For contributors, it should be possible to develop and test regardless of what platform the contributor is coming from.

Development

This section gives a basic overview of the development process including the major goals. This is not comprehensive but should be a good introduction before submitting a pull request.

Support and Documentation

Besides this readme there are two other locations you can go to receive some help:

Python Version Support

This project supports Python 2.6 and up including Python 3.x. PRs, patches, tests etc that don’t include support for both 2.x and 3.x will not be merged. The aim is also the support both major versions of Python within the same code base rather than rely on tools such as 2to3, six or other libraries for the most part.

Documentation

The documentation for this this library is hosted on Read The Docs. It’s generated directly from this library using sphinx:

virtualenv env
env/bin/activate
pip install -r dev_requirements.txt
pip install -e .
cd docs
make html

The build process also builds the documentation to ensure there are not any obvious problems (including broken links).

Note, if you’re running Python 2.6 use dev_requirements-2.6.txt instead.

Function Documentation

Windows API Functions are typically documented in the following format:

def DuplicateHandle(arg1, kwarg1=None):
    """
    A brief message about this function.

    .. seealso::

        <url to the MSDN API documentation for this function>

    :param type arg1:
        Brief information about this argument

    :keyword type kwarg1:
        Brief information about this keyword include it's default
        and how it's handled within the function.

    :raises SomeException:
        Some information on when this exception will be raised

    :rtype: type
    :return:
        Information about the data that's returned
    """

It’s important to note that the docs contain a seealso stanza. This is typically used to reference the MSDN documentation but may also be used to reference examples, white papers or other reference which may be useful in describing the function.

Adding new functions is covered in greater detail here

Testing

Nosetests

Tests are located in the tests/ directory. The tests themselves are run using nosetests either manually or using the setup.py file:

virtualenv env
env/bin/activate
pip install -r dev_requirements.txt
pip install -e .
nosetests tests

Note, if you’re running Python 2.6 use dev_requirements-2.6.txt instead.

Continuous Integration

To consistently ensure the highest quality code, the following services are utilized to test or analyze every commit and pull request:

  • AppVeyor - Runs the unittests, builds wheel files, MSIs and other output artifacts which can be published in a release.
  • Travis - Runs the pep8 and pylint command line tools on the code base and tests. This also builds the docs so documentation problems are easily spotted.
  • Codecov - Analyses and displays code coverage results after tests have run on AppVeyor. Results are posted back to pull requests.
  • ReadTheDocs. - The official location where documentation is built and posted. This is generally for merges into the master branch however.

Additional Testing

As seen above, there are numerous tests besides the unittests. To run all the tests on Windows, much like the continuous integration systems do, you can run test.bat:

> test.bat
========================================================================================
pep8 pywincffi
========================================================================================
========================================================================================
pep8 tests
========================================================================================
========================================================================================
pylint pywincffi
========================================================================================
========================================================================================
pylint tests
========================================================================================
========================================================================================
sphinx-build -q -b html -W -E -a -d docs/build/doctrees docs/source docs/build/html
========================================================================================
========================================================================================
sphinx-build -q -b linkcheck -W -E -a -d docs/build/doctrees docs/source docs/build/html
========================================================================================
========================================================================================
setup.py bdist_wheel
========================================================================================
RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
========================================================================================
nosetests -sv tests
========================================================================================
[ omitted ]
========================================================================================

Keep in mind that this will not setup the virtualenv or build environment for you. So if you can’t build the library or are missing a dependency then the above may fail.

Vagrant

The continuous integration services above negate most of the need to setup your local workstation to handle development for pywincffi, even if you’re not running Windows. In some cases however it can be faster or easiear to work on your local machine.

If you’re not running Windows or you don’t have the tools necessary to develop pywincffi on your machine you can use Vagrant to build a Windows machine and start developing. There’s a more in depth explanation of this process located here:

https://pywincffi.readthedocs.org/en/latest/dev/vagrant.html
Release History

Release History

0.4.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pywincffi-0.4.0-cp26-cp26m-win32.whl (76.6 kB) Copy SHA256 Checksum SHA256 2.6 Wheel Sep 11, 2016
pywincffi-0.4.0-cp26-cp26m-win_amd64.whl (78.3 kB) Copy SHA256 Checksum SHA256 2.6 Wheel Sep 11, 2016
pywincffi-0.4.0-cp27-cp27m-win32.whl (76.3 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Sep 11, 2016
pywincffi-0.4.0-cp27-cp27m-win_amd64.whl (78.0 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Sep 11, 2016
pywincffi-0.4.0-cp33-cp33m-win32.whl (76.2 kB) Copy SHA256 Checksum SHA256 3.3 Wheel Sep 11, 2016
pywincffi-0.4.0-cp33-cp33m-win_amd64.whl (77.9 kB) Copy SHA256 Checksum SHA256 3.3 Wheel Sep 11, 2016
pywincffi-0.4.0-cp34-cp34m-win32.whl (76.2 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Sep 11, 2016
pywincffi-0.4.0-cp34-cp34m-win_amd64.whl (77.9 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Sep 11, 2016
pywincffi-0.4.0-cp35-cp35m-win32.whl (77.6 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Sep 11, 2016
pywincffi-0.4.0-cp35-cp35m-win_amd64.whl (80.3 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Sep 11, 2016
pywincffi-0.4.0.win32-py2.6.msi (213.0 kB) Copy SHA256 Checksum SHA256 2.6 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win32-py2.7.msi (229.4 kB) Copy SHA256 Checksum SHA256 2.7 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win32-py3.3.msi (229.4 kB) Copy SHA256 Checksum SHA256 3.3 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win32-py3.4.msi (155.6 kB) Copy SHA256 Checksum SHA256 3.4 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win32-py3.5.msi (155.6 kB) Copy SHA256 Checksum SHA256 3.5 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win-amd64-py2.6.msi (213.0 kB) Copy SHA256 Checksum SHA256 2.6 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win-amd64-py2.7.msi (229.4 kB) Copy SHA256 Checksum SHA256 2.7 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win-amd64-py3.3.msi (229.4 kB) Copy SHA256 Checksum SHA256 3.3 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win-amd64-py3.4.msi (159.7 kB) Copy SHA256 Checksum SHA256 3.4 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.win-amd64-py3.5.msi (159.7 kB) Copy SHA256 Checksum SHA256 3.5 Windows MSI Installer Sep 11, 2016
pywincffi-0.4.0.zip (65.3 kB) Copy SHA256 Checksum SHA256 Source Sep 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting