Skip to content

Add python-based rest api#15

Open
PGijsbers wants to merge 4 commits intomainfrom
add/python-rest-api
Open

Add python-based rest api#15
PGijsbers wants to merge 4 commits intomainfrom
add/python-rest-api

Conversation

@PGijsbers
Copy link
Contributor

@PGijsbers PGijsbers commented Feb 6, 2026

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 on lines 93 to 94
minio:
condition: service_started # used for servering parquet files
Copy link

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"]

Copy link
Contributor Author

@PGijsbers PGijsbers Feb 9, 2026

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
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.

Copy link
Member

@josvandervelde josvandervelde left a comment

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

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