Metadata-Version: 2.4
Name: pyarkg
Version: 0.1.0
Summary: Python client for the ArKG Chile archaeological dating knowledge graph
Keywords: archaeology,sparql,knowledge-graph,chile,radiocarbon,arkg
Author: Victor Mendez
Author-email: Victor Mendez <victor.mendez@uc.cl>
License-Expression: CC-BY-SA-4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Requires-Dist: requests>=2.25
Requires-Dist: pandas>=1.5 ; extra == 'pandas'
Requires-Python: >=3.10
Project-URL: Homepage, https://arkg.cl
Project-URL: Repository, https://github.com/ArKG-Data/pyarkg
Project-URL: Issues, https://github.com/ArKG-Data/pyarkg/issues
Provides-Extra: pandas
Description-Content-Type: text/markdown

# pyarkg

Python client for the **ArKG Chile** archaeological dating knowledge graph
([arkg.cl](https://arkg.cl)), which openly organizes and distributes
Chilean archaeological dates (radiocarbon and thermoluminescence) using a
SPARQL endpoint powered by MillenniumDB.

## Installation

```bash
pip install pyarkg
```

## Usage

```python
from pyarkg import ArKGClient, dates, sites

# High-level helpers
dataciones = dates(limit=100)   # list of dicts (Fechado)
sitios = sites(limit=50)        # list of dicts (ArchSite)

# Raw SPARQL query
client = ArKGClient()
rows = client.query("SELECT (COUNT(*) AS ?n) WHERE { ?s ?p ?o }")

# As a pandas DataFrame (optional extra)
df = client.query_df("SELECT * WHERE { ?s ?p ?o } LIMIT 10")
```

## Endpoint

By default the client queries `https://arkg.cl/api/sparql`. Override it
with the environment variable `ARKG_SPARQL_ENDPOINT`.

## Optional dependencies

```bash
pip install "pyarkg[pandas]"   # enables query_df()
```

## License

CC BY-SA 4.0

## Citation

Campbell, R., Mendez, V., Arenas, M., Riveros, C. ArKG: Archaeology
Knowledge Graph of Chile. <https://arkg.cl>