Thread
#prefect-community
    Matthias

    Matthias

    6 months ago
    Orion question: is there an equivalent of Parameter’s from Prefect 1.0?
    Kevin Kho

    Kevin Kho

    6 months ago
    It’s the inputs into your
    flow
    so it’s not a task
    @flow
    def abc(x: int, y:int):
        ....
    it’s x and y here
    Matthias

    Matthias

    6 months ago
    But you can set them from the Orion server?
    Kevin Kho

    Kevin Kho

    6 months ago
    On the deployment you can. From UI I don’t think it’s there yet
    Matthias

    Matthias

    6 months ago
    Do you happen to have an example somewhere?
    Kevin Kho

    Kevin Kho

    6 months ago
    from prefect import flow, task
    from prefect.deployments import DeploymentSpec
    from datetime import timedelta
    
    @task
    def abc(x):
        return x+1
    
    @flow
    def myflow(x:int):
        abc(x)
    
    DeploymentSpec(
        flow=myflow,
        name="hello-world-daily",
        parameters={"x": 1}
    )
    Matthias

    Matthias

    6 months ago
    Thanks @Kevin Kho. This is exactly what I need!