Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ name: Release to PyPI
# Nothing here stores a token: the publish job authenticates with PyPI trusted publishing (OIDC),
# and only that job has the id-token permission.
#
# Until the distribution is renamed (tracker #19), pyproject.toml still names it arcadedb-embedded.
# pyproject.toml names the distribution arcadedb (tracker #19).
# The guard in the publish job refuses to publish anything that is not `arcadedb`, so this workflow
# cannot publish arcadedb-embedded from here by accident. The rename is a separate change.
# cannot publish another distribution from here by accident.
#
# TODO (native-wheel port, tracker #19): a second publish job for arcadedb-native, in environment
# pypi-native with its own id-token permission and the same kind of guard (distribution name must
Expand Down Expand Up @@ -240,9 +240,8 @@ jobs:
name: release-dist
path: dist/

# GUARD: this workflow publishes the distribution `arcadedb` and nothing else. While the
# package is still named arcadedb-embedded (tracker #19, rename is a separate change), the
# job stops here, before anything reaches PyPI. Two checks, so neither can drift alone:
# GUARD: this workflow publishes the distribution `arcadedb` and nothing else. A wheel with
# another name stops the job here, before anything reaches PyPI. Two checks, so neither can drift alone:
# the wheel file name and the Name field of its METADATA, both must be DIST_NAME.
- name: Refuse unless every wheel is the distribution ${{ env.DIST_NAME }}
run: |
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/test-python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,19 @@ jobs:
echo "📦 Downloading JARs from arcadedata/arcadedb:${ARCADEDB_IMAGE_TAG}..."

# Create output directory
mkdir -p src/arcadedb_embedded/jars
mkdir -p src/arcadedb/jars

# Create a temporary container and copy JARs from it
CONTAINER_ID=$(docker create "arcadedata/arcadedb:${ARCADEDB_IMAGE_TAG}")
docker cp $CONTAINER_ID:/home/arcadedb/lib/. src/arcadedb_embedded/jars/
docker cp $CONTAINER_ID:/home/arcadedb/lib/. src/arcadedb/jars/
docker rm $CONTAINER_ID

# Verify JARs were downloaded
ls -lh src/arcadedb_embedded/jars/
JAR_COUNT=$(ls -1 src/arcadedb_embedded/jars/*.jar 2>/dev/null | wc -l)
ls -lh src/arcadedb/jars/
JAR_COUNT=$(ls -1 src/arcadedb/jars/*.jar 2>/dev/null | wc -l)
echo "✅ Downloaded $JAR_COUNT JAR files"

ARCADEDB_TAG=$(python3 scripts/extract_version.py src/arcadedb_embedded/jars --format=docker)
ARCADEDB_TAG=$(python3 scripts/extract_version.py src/arcadedb/jars --format=docker)
echo "📌 ArcadeDB version: $ARCADEDB_TAG"
# The build jobs pull arcadedata/arcadedb:<jar version> as their base image,
# so a pinned tag must name that version exactly (26.10.2, not an alias).
Expand All @@ -236,12 +236,12 @@ jobs:
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: arcadedb-jars
path: src/arcadedb_embedded/jars/*.jar
path: src/arcadedb/jars/*.jar
retention-days: 1

# Second job: Build and test on each platform
test:
name: Test arcadedb-embedded (${{ matrix.platform }}, Python ${{ matrix.python-version }})
name: Test arcadedb (${{ matrix.platform }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.runs-on }}
needs: download-jars
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: arcadedb-jars
path: src/arcadedb_embedded/jars
path: src/arcadedb/jars

- name: Set up Java (for native builds on macOS/Windows)
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
Expand Down Expand Up @@ -335,17 +335,17 @@ jobs:
# ln -s "$PYTHON_DIR/python.exe" "$PYTHON_DIR/python3.exe" || true
# python3 --version

- name: Build and test arcadedb-embedded (${{ matrix.platform }})
- name: Build and test arcadedb (${{ matrix.platform }})
shell: bash
env:
# The engine version download-jars read from the ARCADEDB_IMAGE_TAG jars;
# the Docker build takes its base image by this tag, the jars from the artifact
ARCADEDB_TAG: ${{ needs.download-jars.outputs.arcadedb-tag }}
run: |
echo "🔨 Building arcadedb-embedded for ${{ matrix.platform }} with Python ${{ matrix.python-version }}..."
echo "🔨 Building arcadedb for ${{ matrix.platform }} with Python ${{ matrix.python-version }}..."
# The jars download-jars fetched, on every platform, so all wheels of this
# run carry the same engine build (and build.sh checks the integration jar)
./scripts/build.sh ${{ matrix.platform }} ${{ matrix.python-version }} src/arcadedb_embedded/jars
./scripts/build.sh ${{ matrix.platform }} ${{ matrix.python-version }} src/arcadedb/jars

- name: Extract wheel for additional testing
shell: bash
Expand All @@ -358,7 +358,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# Note: Java is NOT required for arcadedb-embedded (JRE is bundled)
# Note: Java is NOT required for arcadedb (JRE is bundled)
# This package works without any external Java installation!

- name: Install wheel and test dependencies
Expand All @@ -380,7 +380,7 @@ jobs:
timeout-minutes: 30
shell: bash
run: |
echo "🧪 Testing arcadedb-embedded (with bundled JRE)..."
echo "🧪 Testing arcadedb (with bundled JRE)..."

# Run pytest with JUnit XML output for structured results
# WINDOWS RUNS WITH --capture=sys (humemai/arcadedb-embedded-python#10). pytest's default fd capture swaps
Expand Down Expand Up @@ -485,7 +485,7 @@ jobs:
summary_file = os.environ.get('GITHUB_STEP_SUMMARY', '/dev/null')

with open(summary_file, 'a', encoding='utf-8') as f:
f.write("## 🧪 Test Results: arcadedb-embedded (${{ matrix.platform }})\n")
f.write("## 🧪 Test Results: arcadedb (${{ matrix.platform }})\n")
f.write("\n")

# Check test status
Expand Down Expand Up @@ -623,9 +623,9 @@ jobs:
if [ "${{ needs.test.result }}" = "success" ]; then
echo "✅ **All platforms passed testing!**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The arcadedb-embedded package has been successfully built and tested." >> $GITHUB_STEP_SUMMARY
echo "The arcadedb package has been successfully built and tested." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Package**: arcadedb-embedded" >> $GITHUB_STEP_SUMMARY
echo "**Package**: arcadedb" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "ℹ️ **Note**: Some platform/Python combinations are excluded from testing:" >> $GITHUB_STEP_SUMMARY
echo "- Windows ARM64 (no GitHub-hosted runners available)" >> $GITHUB_STEP_SUMMARY
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test-python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ jobs:
echo "📦 Downloading JARs from arcadedata/arcadedb:${ARCADEDB_IMAGE_TAG}..."

# Create output directory
mkdir -p src/arcadedb_embedded/jars
mkdir -p src/arcadedb/jars

# Create a temporary container and copy JARs from it
CONTAINER_ID=$(docker create "arcadedata/arcadedb:${ARCADEDB_IMAGE_TAG}")
docker cp $CONTAINER_ID:/home/arcadedb/lib/. src/arcadedb_embedded/jars/
docker cp $CONTAINER_ID:/home/arcadedb/lib/. src/arcadedb/jars/
docker rm $CONTAINER_ID

echo "✅ Downloaded $(ls -1 src/arcadedb_embedded/jars/*.jar | wc -l) JARs"
echo "✅ Downloaded $(ls -1 src/arcadedb/jars/*.jar | wc -l) JARs"

ARCADEDB_TAG=$(python3 scripts/extract_version.py src/arcadedb_embedded/jars --format=docker)
ARCADEDB_TAG=$(python3 scripts/extract_version.py src/arcadedb/jars --format=docker)
echo "📌 ArcadeDB version: $ARCADEDB_TAG"
# The build jobs pull arcadedata/arcadedb:<jar version> as their base image,
# so a pinned tag must name that version exactly (26.10.2, not an alias).
Expand All @@ -150,7 +150,7 @@ jobs:
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: arcadedb-jars-examples
path: src/arcadedb_embedded/jars/*.jar
path: src/arcadedb/jars/*.jar
retention-days: 1

# Second job: Test examples on each platform
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: arcadedb-jars-examples
path: src/arcadedb_embedded/jars
path: src/arcadedb/jars

- name: Set up Java (for native builds on macOS/Windows)
if: matrix.platform != 'linux/amd64' && matrix.platform != 'linux/arm64'
Expand Down Expand Up @@ -246,24 +246,24 @@ jobs:
# ln -s "$PYTHON_DIR/python.exe" "$PYTHON_DIR/python3.exe" || true
# python3 --version

- name: Build arcadedb-embedded (${{ matrix.platform }})
- name: Build arcadedb (${{ matrix.platform }})
shell: bash
env:
# The engine version download-jars read from the ARCADEDB_IMAGE_TAG jars;
# the Docker build takes its base image by this tag, the jars from the artifact
ARCADEDB_TAG: ${{ needs.download-jars.outputs.arcadedb-tag }}
run: |
echo "🔨 Building arcadedb-embedded for ${{ matrix.platform }} with Python ${{ matrix.python-version }}..."
echo "🔨 Building arcadedb for ${{ matrix.platform }} with Python ${{ matrix.python-version }}..."
# The jars download-jars fetched, on every platform, so all wheels of this
# run carry the same engine build (and build.sh checks the integration jar)
./scripts/build.sh ${{ matrix.platform }} ${{ matrix.python-version }} src/arcadedb_embedded/jars
./scripts/build.sh ${{ matrix.platform }} ${{ matrix.python-version }} src/arcadedb/jars

# Note: Java is NOT required - arcadedb-embedded has bundled JRE!
# Note: Java is NOT required - arcadedb has bundled JRE!

- name: Install ArcadeDB Python bindings
shell: bash
run: |
uv pip install --system dist/*embed*.whl
uv pip install --system dist/arcadedb-*.whl

- name: Install example dependencies
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ __marimo__/
# SPDX-License-Identifier: Apache-2.0

# Generated during build - do not commit
src/arcadedb_embedded/_version.py
src/arcadedb/_version.py


# Build artifacts
Expand Down Expand Up @@ -280,8 +280,8 @@ scripts/.dev_version_tracker.json
src/**/__pycache__/
src/**/*.egg-info/
# the JRE and the jars scripts/build-native.sh bundles into the package
src/arcadedb_embedded/jre/
src/arcadedb_embedded/jars/
src/arcadedb/jre/
src/arcadedb/jars/

# git worktrees for issue branches
.worktrees/
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ repos:
rev: v1.7.12
hooks:
- id: actionlint
- repo: local
hooks:
- id: no-old-package-name
name: the old package name does not come back
entry: python3 scripts/check_no_embedded_name.py
language: system
pass_filenames: false
always_run: true
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## What this is

`arcadedb-embedded`: Python bindings for ArcadeDB that run the Java engine in-process through JPype. Each wheel is platform-specific and bundles the ArcadeDB jars plus a jlink'd Java 25 JRE, so users need no Java install. Moved here from `bindings/python` in ArcadeData/arcadedb (history kept; issue numbers in older commit messages refer to that repo).
`arcadedb`: Python bindings for ArcadeDB that run the Java engine in-process through JPype. Each wheel is platform-specific and bundles the ArcadeDB jars plus a jlink'd Java 25 JRE, so users need no Java install. Moved here from `bindings/python` in ArcadeData/arcadedb (history kept; issue numbers in older commit messages refer to that repo).

## Working rules

Expand Down Expand Up @@ -36,7 +36,7 @@ Tests run against the **built wheel**, not the source tree. `pyproject.toml` has

```bash
uv venv # once
uv pip install --reinstall-package arcadedb-embedded "$(ls dist/*.whl | head -1)[test]" # after each build
uv pip install --reinstall-package arcadedb "$(ls dist/*.whl | head -1)[test]" # after each build
uv run pytest # all
uv run pytest tests/test_core.py -v # one file
uv run pytest tests/test_core.py::TestX::test_y # one test
Expand Down
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ArcadeDB Python

[![PyPI](https://img.shields.io/pypi/v/arcadedb-embedded)](https://pypi.org/project/arcadedb-embedded/)
[![Python versions](https://img.shields.io/pypi/pyversions/arcadedb-embedded)](https://pypi.org/project/arcadedb-embedded/)
[![PyPI](https://img.shields.io/pypi/v/arcadedb)](https://pypi.org/project/arcadedb/)
[![Python versions](https://img.shields.io/pypi/pyversions/arcadedb)](https://pypi.org/project/arcadedb/)
[![Tests](https://github.com/ArcadeData/arcadedb-python/actions/workflows/test-python-bindings.yml/badge.svg)](https://github.com/ArcadeData/arcadedb-python/actions/workflows/test-python-bindings.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/ArcadeData/arcadedb-python/blob/main/LICENSE)

Expand All @@ -10,17 +10,19 @@ Python bindings for [ArcadeDB](https://arcadedb.com), the multi-model database (
## Install

```bash
pip install arcadedb-embedded # or: uv add arcadedb-embedded
pip install arcadedb # or: uv add arcadedb
```

This package was published as arcadedb-embedded until 26.10.x; install arcadedb now.

- Python 3.10 to 3.14. CI builds and tests all five versions on every platform below.
- Linux x86_64 and ARM64, macOS on Apple Silicon, Windows x86_64. One wheel per platform and Python version.
- Import name: `arcadedb_embedded`. Optional extras: `arrow`, `pandas`, `vector`.
- Import name: `arcadedb`. Optional extras: `arrow`, `pandas`, `vector`.

## Quick start

```python
import arcadedb_embedded as arcadedb
import arcadedb

with arcadedb.create_database("./mydb") as db:
db.command("sql", "CREATE DOCUMENT TYPE Person")
Expand Down Expand Up @@ -51,11 +53,11 @@ For several processes, other languages, HA or replication, run the regular [Arca

| Package | What it is | Status |
|---|---|---|
| [`arcadedb-embedded`](https://pypi.org/project/arcadedb-embedded/) | These bindings: the engine on a bundled JVM. The package this README describes | Release 26.10.2.post1 |
| [`arcadedb-embedded-native`](https://pypi.org/project/arcadedb-embedded-native/) | The same API with the engine compiled ahead of time by GraalVM Community Edition: no JVM, no JPype. Import `arcadedb_native`, Python 3.11 or later | Preview of alpha quality: `pip install --pre arcadedb-embedded-native`, currently 26.10.2.dev1 |
| [`arcadedb`](https://pypi.org/project/arcadedb/) and [`arcadedb-native`](https://pypi.org/project/arcadedb-native/) | Names reserved for the project. Today `arcadedb` 0.0.1 only installs `arcadedb-embedded`, and `arcadedb-native` 26.10.2.dev1 only installs `arcadedb-embedded-native` | Placeholders |
| [`arcadedb`](https://pypi.org/project/arcadedb/) | These bindings: the engine on a bundled JVM. The package this README describes | First release from this repository: 26.11.1 |
| [`arcadedb-native`](https://pypi.org/project/arcadedb-native/) | The same API with the engine compiled ahead of time by GraalVM Community Edition: no JVM, no JPype. Python 3.11 or later. It imports as `arcadedb`, like the JVM wheel, so install only one of the two | Not in this repository yet (porting is tracked in [#19](https://github.com/ArcadeData/arcadedb-python/issues/19)). Until then a placeholder on PyPI |
| Formerly `arcadedb-embedded` and `arcadedb-embedded-native` | The names of these packages until 26.10.x. They import as `arcadedb_embedded` and `arcadedb_native` | Deprecated: install `arcadedb` |

Two things are not true yet. The native build is not in this repository (porting is tracked in [#19](https://github.com/ArcadeData/arcadedb-python/issues/19)), and releases do not come from this repository: the wheels on PyPI are still built and published from [humemai/arcadedb-embedded-python](https://github.com/humemai/arcadedb-embedded-python). A release workflow for this repository is in review in [#22](https://github.com/ArcadeData/arcadedb-python/pull/22).
Releases from this repository start with 26.11.1. The 26.10.x wheels were built and published from [humemai/arcadedb-embedded-python](https://github.com/humemai/arcadedb-embedded-python). <!-- allow-old-name -->

## Documentation

Expand All @@ -80,11 +82,11 @@ Tests run against the built wheel, not the source tree: install the wheel with i

## Contributing

Open an [issue](https://github.com/ArcadeData/arcadedb-python/issues) or a pull request. Run `pre-commit run --all-files` first, and add a regression test with every fix. The rest of the bindings work from `humemai/arcadedb-embedded-python` is ported here one pull request at a time; [#19](https://github.com/ArcadeData/arcadedb-python/issues/19) lists what is done and what is next.
Open an [issue](https://github.com/ArcadeData/arcadedb-python/issues) or a pull request. Run `pre-commit run --all-files` first, and add a regression test with every fix. The rest of the bindings work from `humemai/arcadedb-embedded-python` is ported here one pull request at a time; [#19](https://github.com/ArcadeData/arcadedb-python/issues/19) lists what is done and what is next. <!-- allow-old-name -->

## Where this code comes from

It moved here from `bindings/python` in [ArcadeData/arcadedb](https://github.com/ArcadeData/arcadedb) at `ee04bd202abce0183c6263a3c4d8a61a4d526960`, with its git history. Issue numbers in older commit messages refer to that repository. [humemai/arcadedb-embedded-python](https://github.com/humemai/arcadedb-embedded-python) is the fork where the bindings kept developing (runtime fixes, JRE trim, native build, benchmarks). Its benchmark tooling stays there.
It moved here from `bindings/python` in [ArcadeData/arcadedb](https://github.com/ArcadeData/arcadedb) at `ee04bd202abce0183c6263a3c4d8a61a4d526960`, with its git history. Issue numbers in older commit messages refer to that repository. [humemai/arcadedb-embedded-python](https://github.com/humemai/arcadedb-embedded-python) is the fork where the bindings kept developing (runtime fixes, JRE trim, native build, benchmarks). Its benchmark tooling stays there. <!-- allow-old-name -->

## License

Expand Down
17 changes: 7 additions & 10 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
# Package names. After the rename of the distribution these are the only
# lines to change; every page takes the names from here.
pkg-name: arcadedb-embedded
import-name: arcadedb_embedded
import-stmt: import arcadedb_embedded as arcadedb
native-pkg-name: arcadedb-embedded-native
native-import-name: arcadedb_native
# Package names. Every page takes them from here.
pkg-name: arcadedb
import-name: arcadedb
import-stmt: import arcadedb
native-pkg-name: arcadedb-native
native-import-name: arcadedb
# Other names a reader meets on PyPI (the pages that compare packages use these).
short-pkg-name: arcadedb
short-native-pkg-name: arcadedb-native
jvm-pkg-name: arcadedb-jvm
driver-pkg-name: arcadedb-driver
grpc-driver-pkg-name: arcadedb-driver-grpc
community-driver-pkg-name: arcadedb-python
community-repo-url: https://github.com/stevereiner/arcadedb-python
repo-url: https://github.com/ArcadeData/arcadedb-python
pypi-url: https://pypi.org/project/arcadedb-embedded/
pypi-url: https://pypi.org/project/arcadedb/
Loading
Loading