flapili04/18/2023, 7:45 AM
Ryan Peden04/18/2023, 4:33 PM
interface. See the GitHub block for an example of a storage block that does this. • You could probably implement that interface with a block that stores an HTTP endpoint as one of its fields, and then calls the endpoint, pulls down a zip containing the directory, and then unzips it in the correct location. • If your block needs to push code to storage as well it will need to implement the
interface, which adds a
method. • If your product is in its own Python module that gets installed via pip, you can get Prefect to auto-load it by setting the right entrypoint. Prefect will load anything with an entrypoint of
, and will also load any additional entrypoints specified via the
config setting. (This section of code is where the autoregistration happens). • See here for an example of a module that sets an entrypoint. I think this is probably too specific to your use case to be part of Prefect itself. You'd need a member of the Prefect team to verify, however. But if you think others would like/want to use it, you could easily publish it as a PyPI module. There's a Prefect collection template generator that can help you get started on that quickly.