Skip to content

Add python-based rest api#15

Merged
PGijsbers merged 5 commits into
mainfrom
add/python-rest-api
Feb 18, 2026
Merged

Add python-based rest api#15
PGijsbers merged 5 commits into
mainfrom
add/python-rest-api

Conversation

@PGijsbers

@PGijsbers PGijsbers commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Adds the Python-based REST API as a service:

  • Routing under the /py path with nginx. The server itself is unaware of this, but currently does not generate relative links, so there is no harm.
  • The current state of the REST API still points to the PHP API for resolving download links (i.e., /data/*). It doesn't require PHP's ES to be up, but I do not believe I can specify that neatly (only with defining a second php-api service, but that doesn't seem worth the effort since the REST API is expected to be able to serve arff files directly (through MinIO) at some point)

It might be confusing that config/python now contains both openml-python and the server configurations. I guess it would be better to have separate directories?

@PGijsbers PGijsbers force-pushed the add/python-rest-api branch from 093a415 to 9d71874 Compare February 6, 2026 09:41
@PGijsbers PGijsbers force-pushed the add/python-rest-api branch from 9d71874 to 99fc1c3 Compare February 6, 2026 09:44
Comment thread docker-compose.yaml Outdated
Comment on lines +93 to +94
minio:
condition: service_started # used for servering parquet files

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since python-api service depends on minio, probably ["rest-api"] should be added in profiles of minio service:

  minio:
    profiles: ["all", "minio", "evaluation-engine", "rest-api"]

@PGijsbers PGijsbers Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the service is declared to depend on MinIO, the MinIO service will automatically be started when starting the Python-based API.

I believe that the use of profiles in this docker compose file should be revised. I feel that there are a lot of redundant profiles that make the same mistake. I deliberately left that out of this PR, though.

It could be that the original philisophy was such that you can spin up the services individually in partial states (e.g., REST API without a MinIO backend to serve the datasets). I think that's valid, but even so some of the profiles are confusing to me. It's also worth considering if we should instead provide two services: the base one (e.g., just requiring the rest api + database) and an extended one (that also requires MinIO).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revising the profiles sound good! Some background: I added the profiles when setting up the services, to make it easier for myself to test part of the services. I think most users just want to run everything. Only base and extended sounds good to me.

@josvandervelde josvandervelde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

It would be good to make some small additions to the README.md, to add at least the endpoint

Comment thread config/python-server/config.toml
Comment thread docker-compose.yaml
Comment thread docker-compose.yaml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants