Skip to content

Commit efa284c

Browse files
committed
Update README.md with installation instructions and usage examples for perisso
1 parent 0c532b1 commit efa284c

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,33 @@
77
_Tapir_ provides a collection of tooling to assist the usage of the JSON API of Archicad.
88
_Perisso_ is a Python package based on this fantastic work and aims to make it even easier to interact with and manipulate digital architectural model elements, by employing a fluent interface. This includes offering an efficient way to filter elements based on various criteria.
99

10+
11+
## Installation
12+
13+
1. Make sure you have the Tapir plugin for Archicad installed.
14+
2. Install `perisso`.
15+
My recommendation: Always use [uv](https://docs.astral.sh/uv/). Use it for everything.
16+
17+
```bash
18+
uv venv
19+
uv pip install perisso
20+
```
21+
22+
Alternatively, you just download the source files. Oldschool.
23+
24+
1025
> [!WARNING]
1126
> Perisso is under development. Please expect breaking changes between versions.
1227
28+
1329
## Usage
1430

15-
Here is a basic example of how to use the `perisso` package:
31+
The simplest way is to just call `perisso()`. This will select all elements by default. To limit the elements to the current selection in Archicad use the `selection` parameter:
32+
```python
33+
sel_elem = perisso(selection=True)
34+
```
35+
36+
Here is a basic example of how to use `perisso`:
1637

1738
```python
1839
from perisso import perisso, Filter, ElType
@@ -22,8 +43,23 @@ filtered_elements = elements.filterBy(Filter.ELEMENT_TYPE).equals(ElType.COLUMN)
2243
print(filtered_elements)
2344
```
2445

46+
> [!CAUTION]
47+
> The resulting element list is compatible with Tapir, but _not_ with the native [Archicad-Python connection](https://pypi.org/project/archicad/).
48+
For that you need to call the `toNative()` function on the perisso collection. The result uses the classes of the AC-Py connection and can then be fed into it.
49+
50+
51+
See the [examples](https://github.com/runxel/perisso/tree/main/examples) for more.
52+
53+
54+
> [!NOTE]
55+
> If a filter does _not_ apply the element concerned is silently removed (not _included_ in the result, that is). Example: A Property is not used on it.
56+
57+
58+
## Contributing
59+
60+
Please open an issue or submit a pull request for any enhancements or bug fixes. Contributions are welcome, but might not be accepted until `perisso` reached a somewhat stable state.
61+
62+
2563
## License
2664

2765
Perisso is licensed under the MIT License.
28-
```
29-

0 commit comments

Comments
 (0)