# polars-darwin-core
Helpers for working with [Darwin Core](https://dwc.tdwg.org/) CSV data using [polars](https://pola.rs/).
## Usage
### Reading a single Darwin Core CSV file
```python
from polars_darwin_core import read_darwin_core_csv
lf = read_darwin_core_csv("occurrence.csv")
print(lf.collect())
```
### Working with Darwin Core Archives (DwC-A)
```python
import polars as pl
from polars_darwin_core import scan_archive
# Path to an unpacked Darwin Core Archive directory (containing meta.xml)
archive_path = "path/to/dwc/archive"
# Load the core file from the archive
lf = scan_archive(archive_path)
# Work with the data
df = lf.filter(pl.col("kingdom") == "Animalia").collect()
print(df)
```
## Development
```shell
# Create a virtualenv however you prefer, then:
pip install -e .[dev]
# Run the test-suite
python -m unittest
```
The project follows the standard [PEP 517](https://peps.python.org/pep-0517/) build flow via [Hatch](https://hatch.pypa.io/):
```shell
python -m build # create sdist and wheel in ./dist/
```
Raw data
{
"_id": null,
"home_page": null,
"name": "polars-darwin-core",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "biodiversity, csv, darwin-core, gbif, polars",
"author": null,
"author_email": "Corey Farwell <coreyf@rwell.org>",
"download_url": "https://files.pythonhosted.org/packages/58/a6/d9eb2cc62d962c61fdee10e6fb5fb3454ac8853397f9b12369f18d58d972/polars_darwin_core-2.0.0.tar.gz",
"platform": null,
"description": "# polars-darwin-core\n\nHelpers for working with [Darwin Core](https://dwc.tdwg.org/) CSV data using [polars](https://pola.rs/).\n\n## Usage\n\n### Reading a single Darwin Core CSV file\n\n```python\nfrom polars_darwin_core import read_darwin_core_csv\n\nlf = read_darwin_core_csv(\"occurrence.csv\")\nprint(lf.collect())\n```\n\n### Working with Darwin Core Archives (DwC-A)\n\n```python\nimport polars as pl\nfrom polars_darwin_core import scan_archive\n\n# Path to an unpacked Darwin Core Archive directory (containing meta.xml)\narchive_path = \"path/to/dwc/archive\"\n\n# Load the core file from the archive\nlf = scan_archive(archive_path)\n\n# Work with the data\ndf = lf.filter(pl.col(\"kingdom\") == \"Animalia\").collect()\nprint(df)\n```\n\n## Development\n\n```shell\n# Create a virtualenv however you prefer, then:\npip install -e .[dev]\n\n# Run the test-suite\npython -m unittest\n```\n\nThe project follows the standard [PEP 517](https://peps.python.org/pep-0517/) build flow via [Hatch](https://hatch.pypa.io/):\n\n```shell\npython -m build # create sdist and wheel in ./dist/\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Helpers for working with Darwin Core (DwC) CSVs using Polars.",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/frewsxcv/polars-darwin-core"
},
"split_keywords": [
"biodiversity",
" csv",
" darwin-core",
" gbif",
" polars"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b6ff5f5b43eefcd9fd53d8445aa8f8d9eef0680987e8d19dbeeb28b36e5a3a06",
"md5": "5e93eeb5fc6c6721fadfac15f73edd4b",
"sha256": "e6655749f8d8c4afd94e05c568525b9ad985c84aa8d0bdfcbab5b5c8bb9bb6bf"
},
"downloads": -1,
"filename": "polars_darwin_core-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5e93eeb5fc6c6721fadfac15f73edd4b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6781,
"upload_time": "2025-07-13T20:11:45",
"upload_time_iso_8601": "2025-07-13T20:11:45.816411Z",
"url": "https://files.pythonhosted.org/packages/b6/ff/5f5b43eefcd9fd53d8445aa8f8d9eef0680987e8d19dbeeb28b36e5a3a06/polars_darwin_core-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "58a6d9eb2cc62d962c61fdee10e6fb5fb3454ac8853397f9b12369f18d58d972",
"md5": "c2c7a9d112b02179c0fcd11871d11ab1",
"sha256": "da4d91f1f9d9aeaf3140b839157a27522d4c445fd5abc469f66edffa0997c658"
},
"downloads": -1,
"filename": "polars_darwin_core-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "c2c7a9d112b02179c0fcd11871d11ab1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 1849985,
"upload_time": "2025-07-13T20:11:47",
"upload_time_iso_8601": "2025-07-13T20:11:47.218831Z",
"url": "https://files.pythonhosted.org/packages/58/a6/d9eb2cc62d962c61fdee10e6fb5fb3454ac8853397f9b12369f18d58d972/polars_darwin_core-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-13 20:11:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "frewsxcv",
"github_project": "polars-darwin-core",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "polars-darwin-core"
}