Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isnt there a better way to wrap REST APIs in a client? #6

Open
mahiki opened this issue Aug 22, 2023 · 3 comments
Open

Isnt there a better way to wrap REST APIs in a client? #6

mahiki opened this issue Aug 22, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@mahiki
Copy link
Owner

mahiki commented Aug 22, 2023

I think there might even be a julia package that does this. Right now I am hard-coding the block structure from existing blocks. Potential support could be:

  • creating blocks, deployments
  • creating flows, tasks

Again, Prefect had a blurb that they were working on a Julia SDK.

@mahiki mahiki self-assigned this Nov 26, 2023
@mahiki
Copy link
Owner Author

mahiki commented Nov 26, 2023

Yes, there are established code-generation techniques to automatically create the REST API client package.

AWS.jl design document describes one approach, covers all AWS services.

Swagger.jl (OpenAPI) packge is a code generator plugin to create your own client library. Its Java based.

So... yes there is a right way, but they are a heavy lift. Maybe the Swagger way is actually pretty easy -- not ready to put effort into learning it just now.

So far the hand rolled small-scale is the best approach. I only need a small set of API calls to run the Julia part of my deployed jobs. Don't need to deploy or define flows in Julia -- just need the following:

  • access to block information
  • logging from Julia process

Leaving this issue open for now, but likely will close as out of scop.

@mahiki mahiki added the question Further information is requested label Nov 26, 2023
@mahiki
Copy link
Owner Author

mahiki commented Apr 30, 2024

Notes from slack, other examples of API wrapping:

Trello.jl
Airtable.jl

They say avoid AWS.jl as an example, lot of design driven by the huge size of the API.

@mahiki
Copy link
Owner Author

mahiki commented Jul 22, 2024

New one that is very clean example, MatterMost.jl. OpenAPI generated interface.

So what else is needed for writing Julia code that orchestrates with Prefect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant