| title | Quickstart |
|---|---|
| description | Get started with Davia in minutes by following these simple steps. |
Davia requires Python 3.9 or higher. Make sure you have the correct Python version installed before proceeding.
First, install Davia using pip:
pip install daviaCreate a new Python file, for example welcome.py, and add the following code:
from davia import Davia
app = Davia()
@app.task
def get_welcome_message(name: str = "there") -> str:
"""
Return a personalized welcome message.
"""
return f"Hi {name}! Welcome to Davia !"
if __name__ == "__main__":
app.run()Run your Python file:
python welcome.pyAlternatively, you can use the Davia CLI command instead of including app.run() in your code:
# Without app.run() in your code
from davia import Davia
app = Davia()
@app.task
def get_welcome_message(name: str = "there") -> str:
"""
Return a personalized welcome message.
"""
return f"Hi {name}! Welcome to Davia !"Then run it with:
davia run welcome.pyQuick demo:
<iframe width="100%" height="315" src="https://www.youtube.com/embed/8VEuvgsLPwA?si=KGjuWvDmTkJQVwW1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerpolicy="strict-origin-when-cross-origin" ></iframe>