Services
A service is a long-running background process deployed on Datatailr. Unlike apps, services do not serve a user-facing web interface — they run headlessly and are designed to provide backend functionality such as REST APIs, data ingestion pipelines, message consumers, or any continuously running process.
Services stay running until explicitly stopped, making them ideal for workloads that need to be always available.
How It Works
You write your service as a regular Python script — typically setting up a web server, a message consumer, or a data listener. Then you create a Service object to deploy it to Datatailr.
# api.py
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/health")
def health():
return jsonify({"status": "ok"})
@app.route("/predict", methods=["POST"])
def predict():
# Your ML model inference logic here
return jsonify({"prediction": 42})
def main():
app.run(host="0.0.0.0", port=8080)
if __name__ == "__main__":
main()
# deploy.py
from api import main
from datatailr import Service
service = Service(
name="Prediction API",
entrypoint=main,
python_requirements="flask",
)
service.run()
Key Features
- Always-on — Services run continuously until stopped or redeployed.
- Any framework — Use Flask, FastAPI, or any Python server/process.
- Internal networking — Services are accessible to other compute processes within the same environment.
- Access control — Control who can manage the service through Datatailr's ACL system.
- Resource management — Configure CPU, memory, and other resources to match your service's needs.
Accessing a Service
Other compute processes (workflows, apps, or other services) running in the same environment can reach your service by using its name as the domain — no port configuration needed.
For example, if you deployed a service with name="Prediction API", its internal hostname is prediction-api (the lowercase, hyphenated version of the name):
import requests
response = requests.get("http://prediction-api/health")
prediction = requests.post("http://prediction-api/predict", json={"input": [1, 2, 3]})
Use the service name, not the display name
The domain is derived from the service name, not the display name. For example, a service named "Prediction API" is accessible at http://prediction-api, not http://Prediction API.
Deploying a Service
Run your deployment script to deploy the service:
python deploy.py
You can also deploy the demo service from a workspace:
python -m examples service
Once deployed, manage your service:
dt job ls # List all compute processes
dt job get prediction-api # View service details
dt log read prediction-api # Read service logs
Managing in the Dashboard
Navigate to Compute Processes and select the Services tab to see all your deployed services. The view shows the service name, current state, owner, architecture, resource allocation, and port number.

Click on any service to view its logs, definition, and deployment history.