Skip to main content

Open-source tool for exploring, labeling, and monitoring data for NLP projects.

Project description

Argilla
Argilla-Server

The repository for the Python native FastAPI server for Argilla backend.

CI Codecov CI

Argilla is a collaboration platform for AI engineers and domain experts that require high-quality outputs, full data ownership, and overall efficiency.

This repository only contains developer info about the backend server. If you want to get started, we recommend taking a look at our main repository or our documentation.

Are you a contributor or do you want to understand what is going on under the hood, please keep reading the documentation below.

Source code folder structure

The following is a high-level overview of relevant folders and files in the argilla-server source code:

/argilla_server
  /api # Including all the API endpoints and related code
    /errors # Custom exceptions and error handlers
      /v1
    /handlers # Request FastAPI handlers
      /v1
    /policies # Authorization policies for resources
      /v1
    /schemas # Pydantic schemas for request and response bodies
      /v1
  /contexts # Domain contexts for the application including business logic
    accounts.py
    datasets.py
    search.py
    ...
  /models # SQLAlchemy ORM models for the database
    database.py

Folders inside /api are organized by API version, having right now only v1 implemented. This is in contrast to /contexts and /models folders that are not versioned. This is because the business logic and canonical database models are not exposed directly to the API, and therefore are not subject to versioning.

Development environment

By default all commands executed with pdm run will get environment variables from .env.dev except command pdm test that will overwrite some of them using values coming from .env.test file.

These environment variables can be override if necessary so feel free to defined your own ones locally.

Run cli

pdm cli

Run database migrations

By default a SQLite located at ~/.argilla/argilla.db will be used. You can create the database and run migrations with the following custom PDM command:

pdm migrate

Run tests

A SQLite database located at ~/.argilla/argilla-test.db will be automatically created to run tests. You can run the entire test suite using the following custom PDM command:

pdm test

Run development server

Note: If you need to run the frontend server you can follow the instructions at the argilla-frontend project

Run uvicorn development server

pdm server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argilla_server-2.0.0a0.tar.gz (2.0 MB view hashes)

Uploaded Source

Built Distribution

argilla_server-2.0.0a0-py3-none-any.whl (2.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page