update readme

This commit is contained in:
jan 2017-09-18 03:08:18 -07:00
parent dc5538dd68
commit b8708d24d3

View File

@ -2,6 +2,7 @@
**fatamorgana** is a Python package for reading and writing OASIS format layout files. **fatamorgana** is a Python package for reading and writing OASIS format layout files.
**Homepage:** https://mpxd.net/gogs/jan/fatamorgana
**Capabilities:** **Capabilities:**
* This package is a work-in-progress and is largely untested -- it works for * This package is a work-in-progress and is largely untested -- it works for
@ -23,7 +24,7 @@
* (optional) numpy * (optional) numpy
Install with pip from PyPi: Install with pip from PyPi (preferred):
```bash ```bash
pip install fatamorgana pip install fatamorgana
``` ```
@ -33,6 +34,26 @@ Install directly from git repository:
pip install git+https://mpxd.net/gogs/jan/fatamorgana.git@release pip install git+https://mpxd.net/gogs/jan/fatamorgana.git@release
``` ```
## Use ## Documentation
Most functions and classes are documented inline.
To read the inline help,
```python3
import fatamorgana
help(fatamorgana.OasisLayout)
```
The documentation is currently very sparse and I expect to improve it whenever possible!
## Examples
Read an OASIS file and write it back out:
```python3
import fatamorgana
with open('test.oas', 'rb') as f:
layout = fatamorgana.OasisLayout.read(f)
with open('test_write.oas', 'wb') as f:
layout.write(f)
```