Metadata-Version: 2.1
Name: layouts
Version: 0.1
Summary: Python API for HID-IO HID Layouts Repository
Home-page: https://github.com/hid-io/layouts-python
License: UNKNOWN
Author: Jacob Alexander
Author-email: haata@kiibohd.com
Requires-Python: >=3.4
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: requests
Requires-Dist: pygithub

# HID-IO layouts Python API

This is the Python API for the HID-IO [layouts](https://github.com/hid-io/layouts) repository.

The purpose of this API is to acquire and merge the JSON HID layouts.
With some additional helpers to deal with string composition.


## Usage

Some basic usage examples.


### List Layouts

```python
import layouts

mgr = layouts.Layouts()
print(mgr.list_layouts()
```


### Retrieve Layout

```python
import layouts

mgr = layouts.Layouts()
layout = mgr.get_layout('default')

print(layout.name()) # Name of merged layout
print(layout.json()) # Fully merged JSON dict
```


### Composition Example

```python
import layouts

mgr = layouts.Layouts()
layout = mgr.get_layout('default')

input_str = "Hello World!"
print(layout.compose(input_str))
```


