Start to document API

This commit is contained in:
Oliver Hamlet
2016-08-15 20:51:24 +01:00
parent 3ad5327ae9
commit 5fe5acff15
8 changed files with 507 additions and 35 deletions
+4 -15
View File
@@ -2,6 +2,7 @@ LOOT API Python Module
=======================
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/loot/loot-api-python?branch=master&svg=true)](https://ci.appveyor.com/project/WrinklyNinja/loot-api-python)
[![Documentation Status](https://readthedocs.org/projects/loot-api-python/badge/)](http://loot-api-python.readthedocs.io/)
A Python module that wraps the LOOT API, generated by [pybind11](https://github.com/pybind/pybind11).
@@ -17,24 +18,12 @@ loot_api_python-<short revision ID>-win32.7z
For example `loot_api_python-94de368-win32.7z` was built using the revision with shortened commit ID `94de368`.
The build archives contain a `loot_api.pyd` and a `loot_api.dll`: see the usage section below on how to use them.
## Documentation
The documentation can be found online at [Read The Docs](http://loot-api-python.readthedocs.org/).
## Build Instructions
The module's build system uses [CMake](https://cmake.org/) and requires [Python](https://www.python.org) (tested with 2.7). Make sure they're installed, then run CMake, and build the generated solution file.
Only Windows support has been tested, though Linux builds should also be possible.
## Usage
Copy the `loot_api.pyd` file that is built and the `loot_api.dll` file in the same directory to wherever you wish to import the module from, then:
```
>>> import loot_api
>>> loot_api.is_compatible(0,9,0)
True
```
The DLL requires the [Visual C++ 2015 Redistributable (x86)](https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe) to be installed.
**Note:** The module is currently built against revision [e40624c](https://github.com/loot/loot/tree/e40624cf7498f69b9393a02572a1eaf31065df44) of the API, which is post-0.9.2 and pre-0.10.0, but uses the v0.10 metadata syntax (as specified at that revision, in case there are further changes before the v0.10 release).