SDK Guide
Install and configure Ajrly client SDKs for JavaScript, Python, and other languages.
Ajrly provides official SDKs for popular programming languages. SDKs handle authentication, request formatting, error handling, and pagination automatically.
Installation
npm install @ajrly/sdkpip install ajrlygo get github.com/ajrly/ajrly-goQuick Start
import { Ajrly } from '@ajrly/sdk';
const client = new Ajrly({
apiKey: process.env.AJRLY_API_KEY,
});
const projects = await client.projects.list();
console.log(projects.data);
from ajrly import Ajrly
client = Ajrly(api_key=os.environ["AJRLY_API_KEY"])
projects = client.projects.list()
print(projects.data)package main
import (
"fmt"
"os"
ajrly "github.com/ajrly/ajrly-go"
)
func main() {
client := ajrly.NewClient(os.Getenv("AJRLY_API_KEY"))
projects, err := client.Projects.List()
if err != nil {
panic(err)
}
fmt.Println(projects)
}
Configuration
Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Your API key |
baseUrl | string | https://api.ajrly.com/v1 | API base URL |
timeout | number | 30000 | Request timeout (ms) |
retries | number | 2 | Max retry attempts |
Environment Variables
SDKs automatically read from environment variables:
export AJRLY_API_KEY=sk_live_abc123
export AJRLY_BASE_URL=https://api.ajrly.com/v1
Error Handling
SDKs throw typed errors for easy handling:
import { Ajrly, AjrlyError, RateLimitError } from '@ajrly/sdk';
try {
await client.projects.create({ name: 'Test' });
} catch (error) {
if (error instanceof RateLimitError) {
console.log(`Rate limited. Retry after ${error.retryAfter}s`);
} else if (error instanceof AjrlyError) {
console.error(`API error: ${error.code} — ${error.message}`);
}
}
Pagination
SDKs provide helpers for paginated responses:
// Manual pagination
const page1 = await client.projects.list({ page: 1, perPage: 20 });
const page2 = await client.projects.list({ page: 2, perPage: 20 });
// Auto-pagination iterator
for await (const project of client.projects.list({ perPage: 50 })) {
console.log(project.name);
}
TypeScript Support
The JavaScript SDK includes full TypeScript definitions:
import { Ajrly, ListResponse, Project } from '@ajrly/sdk';
const client = new Ajrly({ apiKey: 'sk_live_abc123' });
const response: ListResponse<Project> = await client.projects.list();
const project: Project = response.data[0];
Supported Languages
| Language | Package | Status |
|---|---|---|
| JavaScript | @ajrly/sdk | Stable |
| Python | ajrly | Stable |
| Go | ajrly-go | Stable |
| Ruby | ajrly-ruby | Beta |
| PHP | ajrly/ajrly-php | Beta |
Last updated: February 22, 2026
Edit this page on GitHub
Was this page helpful?
Thanks for your feedback!