Merge branch 'fix-python-docs' into 'master'

Improve Python examples

See merge request GNOME/libsecret!144
This commit is contained in:
Niels De Graef 2024-06-20 06:17:12 +00:00
commit 337a0937fb

View File

@ -53,11 +53,13 @@ var schema = new Secret.Schema.new("org.mock.Schema",
In python use the standard introspection import mechanism to get at libsecret: In python use the standard introspection import mechanism to get at libsecret:
```python ```python
import gi
gi.require_version("Secret", "1")
from gi.repository import Secret from gi.repository import Secret
# ... and a here's sample line of code which uses the import # ... and a here's sample line of code which uses the import
schema = Secret.Schema.new("org.mock.Schema", schema = Secret.Schema.new("org.mock.Schema",
Secret.SchemaFlags.NONE, { "name", Secret.SchemaAttributeType.STRING }) Secret.SchemaFlags.NONE, { "name": Secret.SchemaAttributeType.STRING })
``` ```
## Vala: Compiling with libsecret ## Vala: Compiling with libsecret