gancio-py 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ test:
9
+ uses: ./.github/workflows/test.yml
10
+
11
+ publish:
12
+ needs: test
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ id-token: write
16
+
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v5
22
+
23
+ - name: Build package
24
+ run: uv build
25
+
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,53 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ paths-ignore:
6
+ - '*.md'
7
+ - LICENSE
8
+ workflow_call:
9
+
10
+ jobs:
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v5
17
+ - name: Lint
18
+ run: uvx ruff check
19
+
20
+ integration:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ matrix:
24
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
25
+
26
+ steps:
27
+ - uses: actions/checkout@v6
28
+
29
+ - name: Start Gancio
30
+ run: >-
31
+ docker run -d
32
+ --name gancio
33
+ --restart unless-stopped
34
+ -e NODE_ENV=development
35
+ -p 13120:13120
36
+ cisti/gancio:1.28.2
37
+
38
+ - name: Install uv
39
+ uses: astral-sh/setup-uv@v5
40
+ with:
41
+ python-version: ${{ matrix.python-version }}
42
+
43
+ - name: Install dependencies
44
+ run: uv sync --extra test
45
+
46
+ - name: Run tests
47
+ run: uv run pytest -m integration -v --cov --cov-branch --cov-report=term-missing --cov-report=xml
48
+
49
+ - name: Upload coverage to Coveralls
50
+ if: matrix.python-version == '3.13'
51
+ uses: coverallsapp/github-action@v2
52
+ with:
53
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+ .mypy_cache/
10
+ .coverage
11
+ coverage.xml
12
+ *.egg
13
+ .DS_Store
14
+ .idea/
@@ -0,0 +1,6 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.7
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
@@ -0,0 +1,8 @@
1
+ # 0.1.0 (20-10-2026)
2
+
3
+ ## Initial version
4
+ Supports first-run setup, events, places, settings, pages, collections, filters
5
+ [#1](https://github.com/tboye/gancio-py/pull/1)
6
+ [#2](https://github.com/tboye/gancio-py/pull/2)
7
+ [#3](https://github.com/tboye/gancio-py/pull/3)
8
+ [#4](https://github.com/tboye/gancio-py/pull/4)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tboye
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.5
2
+ Name: gancio-py
3
+ Version: 0.1.0
4
+ Summary: Python client for the Gancio event platform API
5
+ Project-URL: Homepage, https://github.com/tboye/gancio-py
6
+ Project-URL: Repository, https://github.com/tboye/gancio-py
7
+ Project-URL: Issues, https://github.com/tboye/gancio-py/issues
8
+ Author-email: tboye <me@tboye.dev>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: api-client,events,gancio
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: requests<3,>=2.34
21
+ Provides-Extra: dev
22
+ Requires-Dist: pre-commit; extra == 'dev'
23
+ Requires-Dist: ruff; extra == 'dev'
24
+ Provides-Extra: test
25
+ Requires-Dist: pillow<13,>=12; extra == 'test'
26
+ Requires-Dist: pytest-cov<8,>=7; extra == 'test'
27
+ Requires-Dist: pytest-sugar<2,>=1.1.1; extra == 'test'
28
+ Requires-Dist: pytest<10,>=9; extra == 'test'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # gancio-py
32
+
33
+ [![Tests](https://github.com/tboye/gancio-py/actions/workflows/test.yml/badge.svg)](https://github.com/tboye/gancio-py/actions/workflows/test.yml)
34
+ [![PyPI](https://img.shields.io/pypi/v/gancio-py)](https://pypi.org/project/gancio-py/)
35
+ [![Python](https://img.shields.io/pypi/pyversions/gancio-py)](https://pypi.org/project/gancio-py/)
36
+ [![Coverage Status](https://coveralls.io/repos/github/tboye/gancio-py/badge.svg?branch=main)](https://coveralls.io/github/tboye/gancio-py?branch=main)
37
+
38
+ Python client for the [Gancio](https://gancio.org) event platform API.
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install gancio-py
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ```python
49
+ from gancio_py import Gancio
50
+
51
+ # Connect and log in
52
+ gancio = Gancio("https://your-gancio-instance.org")
53
+ gancio.login("user@example.com", "password")
54
+
55
+ # Or use a pre-existing token
56
+ gancio = Gancio("https://your-gancio-instance.org", access_token="your-token")
57
+
58
+ # Create an event
59
+ event = gancio.create_event(title="My Event",
60
+ start_datetime=1700000000,
61
+ place_name="The Venue",
62
+ place_address="123 Main St",
63
+ tags=["music", "live"])
64
+
65
+ # List events
66
+ events = gancio.get_events(tags=["music"])
67
+
68
+ # Get a specific event
69
+ event = gancio.get_event("my-event")
70
+
71
+ # Update an event
72
+ gancio.update_event(event_id=1, title="Updated Title")
73
+
74
+ # Delete an event
75
+ gancio.delete_event(event_id=1)
76
+
77
+ # Search places
78
+ places = gancio.search_place("Venue")
79
+ ```
80
+
81
+ ### Error handling
82
+
83
+ ```python
84
+ from gancio_py import Gancio, GancioError
85
+
86
+ gancio = Gancio("https://your-gancio-instance.org")
87
+
88
+ try:
89
+ event = gancio.get_event("nonexistent-slug")
90
+ except GancioError as e:
91
+ print(e.status_code) # 404
92
+ print(e.response_body) # error details from the server
93
+ ```
94
+
95
+ ## Development
96
+
97
+ Run integration tests locally with Docker:
98
+
99
+ ```bash
100
+ uv sync --extra test
101
+
102
+ # Fresh container (runs first-time setup automatically):
103
+ docker compose down -v && docker compose up -d
104
+ uv run pytest -m integration -v --cov
105
+
106
+ # Or against an existing instance with known credentials:
107
+ GANCIO_URL=http://localhost:13120 \
108
+ GANCIO_ADMIN_EMAIL=admin \
109
+ GANCIO_ADMIN_PASSWORD=yourpassword \
110
+ uv run pytest -m integration -v --cov
111
+ ```
112
+
113
+ ### Linting
114
+
115
+ ```bash
116
+ uvx ruff check
117
+ uvx ruff check --fix # auto-fix
118
+ ```
119
+
120
+ ## License
121
+
122
+ [MIT](LICENSE)
@@ -0,0 +1,92 @@
1
+ # gancio-py
2
+
3
+ [![Tests](https://github.com/tboye/gancio-py/actions/workflows/test.yml/badge.svg)](https://github.com/tboye/gancio-py/actions/workflows/test.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/gancio-py)](https://pypi.org/project/gancio-py/)
5
+ [![Python](https://img.shields.io/pypi/pyversions/gancio-py)](https://pypi.org/project/gancio-py/)
6
+ [![Coverage Status](https://coveralls.io/repos/github/tboye/gancio-py/badge.svg?branch=main)](https://coveralls.io/github/tboye/gancio-py?branch=main)
7
+
8
+ Python client for the [Gancio](https://gancio.org) event platform API.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install gancio-py
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```python
19
+ from gancio_py import Gancio
20
+
21
+ # Connect and log in
22
+ gancio = Gancio("https://your-gancio-instance.org")
23
+ gancio.login("user@example.com", "password")
24
+
25
+ # Or use a pre-existing token
26
+ gancio = Gancio("https://your-gancio-instance.org", access_token="your-token")
27
+
28
+ # Create an event
29
+ event = gancio.create_event(title="My Event",
30
+ start_datetime=1700000000,
31
+ place_name="The Venue",
32
+ place_address="123 Main St",
33
+ tags=["music", "live"])
34
+
35
+ # List events
36
+ events = gancio.get_events(tags=["music"])
37
+
38
+ # Get a specific event
39
+ event = gancio.get_event("my-event")
40
+
41
+ # Update an event
42
+ gancio.update_event(event_id=1, title="Updated Title")
43
+
44
+ # Delete an event
45
+ gancio.delete_event(event_id=1)
46
+
47
+ # Search places
48
+ places = gancio.search_place("Venue")
49
+ ```
50
+
51
+ ### Error handling
52
+
53
+ ```python
54
+ from gancio_py import Gancio, GancioError
55
+
56
+ gancio = Gancio("https://your-gancio-instance.org")
57
+
58
+ try:
59
+ event = gancio.get_event("nonexistent-slug")
60
+ except GancioError as e:
61
+ print(e.status_code) # 404
62
+ print(e.response_body) # error details from the server
63
+ ```
64
+
65
+ ## Development
66
+
67
+ Run integration tests locally with Docker:
68
+
69
+ ```bash
70
+ uv sync --extra test
71
+
72
+ # Fresh container (runs first-time setup automatically):
73
+ docker compose down -v && docker compose up -d
74
+ uv run pytest -m integration -v --cov
75
+
76
+ # Or against an existing instance with known credentials:
77
+ GANCIO_URL=http://localhost:13120 \
78
+ GANCIO_ADMIN_EMAIL=admin \
79
+ GANCIO_ADMIN_PASSWORD=yourpassword \
80
+ uv run pytest -m integration -v --cov
81
+ ```
82
+
83
+ ### Linting
84
+
85
+ ```bash
86
+ uvx ruff check
87
+ uvx ruff check --fix # auto-fix
88
+ ```
89
+
90
+ ## License
91
+
92
+ [MIT](LICENSE)
@@ -0,0 +1,8 @@
1
+ services:
2
+ gancio:
3
+ image: cisti/gancio
4
+ restart: unless-stopped
5
+ environment:
6
+ - NODE_ENV=development
7
+ ports:
8
+ - "13120:13120"
@@ -0,0 +1,5 @@
1
+ from gancio_py.client import Gancio as Gancio
2
+ from gancio_py.exceptions import GancioError as GancioError
3
+ from gancio_py.settings import BoolSetting as BoolSetting
4
+ from gancio_py.settings import JsonSetting as JsonSetting
5
+ from gancio_py.settings import StrSetting as StrSetting