Skip to content

Reference

Complete API reference for Aksara — a quick lookup for all classes, methods, and options.


What is This Section?

This is a reference guide, not a tutorial. Use it when you need to look up:

  • What options a setting accepts
  • What methods are available on a class
  • What parameters a function takes

New to Aksara? Start with the Getting Started Guide or Quickstart instead.


Reference Sections

Reference What It Covers
Settings Reference All configuration options for your app
API Reference ViewSets, serializers, permissions, actions
ORM Reference Models, fields, queries, managers
CLI Reference All command-line commands
Exceptions Error types and how to handle them
Types Type definitions for type hints

Quick Reference

Settings

# settings.py
AKSARA = {
    "DEBUG": True,                                    # Enable debug mode
    "DATABASE_URL": "postgresql://localhost/myapp",   # Database connection
    "SECRET_KEY": "your-secret-key",                 # For encryption
    "INSTALLED_APPS": ["myapp"],                      # Your apps
}

👉 Full Settings Reference


Models

from aksara import Model, fields

class User(Model):
    email = fields.Email(unique=True)
    name = fields.String(max_length=100)
    is_active = fields.Boolean(default=True)

👉 ORM Reference


ViewSets

from aksara.api import ModelViewSet

class UserViewSet(ModelViewSet):
    model = User
    serializer_class = UserSerializer
    permission_classes = [IsAuthenticated]

👉 API Reference


CLI Commands

# Create a project
aksara startproject myproject

# Create database migrations
aksara makemigrations

# Apply migrations
aksara migrate

# Start the development server
aksara dev

👉 CLI Reference


Version Information

Current version: 0.5.46

import aksara
print(aksara.__version__)  # 0.5.46

Check your installed version:

aksara --version

How to Use This Reference

Finding What You Need

  1. Know the setting name?Settings Reference
  2. Working with models?ORM Reference
  3. Building an API?API Reference
  4. Running commands?CLI Reference
  5. Handling errors?Exceptions

Understanding the Format

Each reference page uses this format:

# Class or Function Name
description of what it does

# Parameters/Options
parameter_name: type = default  # description

# Example
actual_code_example()

Section For
Getting Started Learning Aksara from scratch
Tutorials Building complete applications
ORM Guide Understanding the ORM in depth
API Guide Understanding the API layer
Changelog What's new in each version