dat1-cli
A command line interface for the dat1 platform.
Installation
pip install dat1-cli
Usage
Initialize with your API key:
dat1 login
To initialize a new model project, run in the root directory of your project:
dat1 init
This will create a dat1.yaml file in the root directory of your project. This file contains the configuration for your model:
model_name: <your model name>
exclude:
- '**/.git/**'
- '**/.idea/**'
- '*.md'
- '*.jpg'
- .dat1.yaml
- .DS_Store
Exclude uses glob patterns to exclude files from being uploaded to the platform.
To upload your model to the platform:
dat1 deploy
A good starting point for your model is using one of the example models.
Otherwise, the platform expects a handler.py file in the root directory of your project that contains a FastAPI app with two endpoints: GET / for healthchecks and POST /infer for inference.
An example handler is shown below:
from fastapi import Request, FastAPI
from vllm import LLM, SamplingParams
import os
# Model initialization Code
# This code should be placed before the FastAPI app is initialized
llm = LLM(model=os.path.expanduser('./'), load_format="safetensors", enforce_eager=True)
app = FastAPI()
@app.get("/")
async def root():
return "OK"
@app.post("/infer")
async def infer(request: Request):
# Inference Code
request = await request.json()
prompts = request["prompt"]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
outputs = llm.generate(prompts, sampling_params)
return { "response" : outputs[0].outputs[0].text }
Streaming Responses with Server-Sent Events
To stream responses to the client, you can use Server-Sent Events (SSE).
To specify that the response should be streamed, you need to add response_type: sse to the model definition in the dat1.yaml file.
model_name: chat_completion
response_type: sse
exclude:
- '**/.git/**'
- '**/.idea/**'
- '*.md'
- '*.jpg'
- .dat1.yaml
The handler code should be modified to return a generator that yields the responses:
from fastapi import Request, FastAPI
from sse_starlette.sse import EventSourceResponse
import json
app = FastAPI()
@app.get("/")
async def root():
return "OK"
async def response_generator():
for i in range(10):
yield json.dumps({"response": f"Response {i}"})
@app.post("/infer")
async def infer(request: Request):
return EventSourceResponse(response_generator(), sep="\n")
Launching Locally
Pre-requisites
- Docker
- CUDA-compatible GPU
- NVIDIA Container Toolkit
To launch your model locally, run:
dat1 serve
License
MIT
Metadata
Release files for dat1-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dat1_cli-0.3.0.tar.gz | 7.0 kB | With provenance | Details for dat1_cli-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dat1_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for dat1_cli-0.3.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / dat1_cli-0.3.0.tar.gz
| Download URL | dat1_cli-0.3.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd9915358b34dbd14321a851d3f3f0f047a202a68d626e04b87438dda52d49ff
|
|
BLAKE2b-256 checksum How to use checksums |
04271feee4de318de207b949f341ba85ddc5f13740f8c438608093c5f1c28d86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency logRelease files / dat1_cli-0.3.0-py3-none-any.whl
| Download URL | dat1_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dabbfc49565b59f60f3b1819a77bd1275bb29c282be2d8d29f57259def7affdb
|
|
BLAKE2b-256 checksum How to use checksums |
3371f295aad0479cea89ea70ac7c67dee2e21a94cd8c398f6772c7f1979abf98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency logSecurity for dat1-cli 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dat1_cli-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.