Skip to main content

an5Client

Auto-generated client artifacts for AN5 ORM. Contains TypeScript, Python, .NET (C#), Golang, and Rust model types, metadata, and entity classes generated from .an5 schema files.

Structure

an5Client/
├── typescript/          # TypeScript types and metadata
│   ├── index.ts         # Barrel exports & An5Client class
│   ├── base.ts          # Base types, filters, error classes
│   ├── an5Metadata.ts   # Model-table mappings, relations
│   ├── User.ts          # Generated User model & TableClient
│   └── Order.ts         # Generated Order model & TableClient
├── python/              # Python metadata, dataclasses, and ORM client
│   ├── __init__.py
│   ├── an5_metadata.py  # Model-table mappings & field metadata
│   ├── an5_models.py    # Python @dataclass model definitions
│   └── an5_client.py    # Typed An5Client ORM class
├── dotnet/              # .NET entity classes & DbContext
│   ├── User.cs
│   ├── Order.cs
│   ├── An5DbContext.cs  # Complete DbContext & TableClient<T> repository
│   └── An5Config.cs
└── golang/              # Golang models & DbContext repository
    ├── User.go          # Generated User struct + WhereInput/OrderBy/Args
    ├── Order.go         # Generated Order struct + WhereInput/OrderBy/Args
    ├── client.go        # An5DbContext & generic TableClient[T]
    └── config.go        # Environment connection string helper
└── rust/                # Rust crate (serde + chrono)
    ├── Cargo.toml       # Crate manifest (an5-client)
    └── src/
        ├── lib.rs       # Module exports
        ├── models.rs    # Structs + WhereInput/OrderBy/FindManyArgs
        ├── filters.rs   # StringFilter/IntFilter/NumberFilter/Bool/DateTime + Dialect
        ├── metadata.rs  # model_to_table / model_primary_key
        ├── config.rs    # DATABASE_URL helper
        └── client.rs    # An5Client (adapter-backed) + typed <Model>Table handles + vector math

Usage

TypeScript

import { An5Client, User, Order } from './an5Client/typescript';

const db = new An5Client();

// Supports flex property casing (db.User, db.user, db.Users, db.users)
const users = await db.User.findMany({
  where: { email: { contains: '@example.com' } }
});

Python

from an5Client.python import An5Client, User

db = An5Client()

# Supports flexible property casing (db.User, db.user, db.Users, db.users)
users = db.User.find_many(where={"email": {"contains": "@example.com"}})
user = db.User.create({"email": "john@example.com", "name": "John"})

.NET (C#)

using An5Orm;
using An5Orm.Entities;

var db = new An5DbContext(connectionString);

// Supports flexible property access (db.User, db.Users)
var users = db.User.FindMany("Email LIKE '%@example.com%'");
var count = db.User.Count();
db.User.Create(new User { Email = "john@example.com", Name = "John" });

Golang

package main

import (
    "context"
    "database/sql"
    "fmt"
    "an5Client/golang"
)

func main() {
    db, _ := sql.Open("sqlserver", an5client.GetDefaultConnectionString())
    ctx := an5client.NewAn5DbContext(db)

    // Supports flexible property access (ctx.User, ctx.Users)
    users, _ := ctx.User.FindMany(context.Background(), "email LIKE ?", "%@example.com%")
    fmt.Printf("Found %d users\n", len(users))
}

Rust

use an5_client::{An5Client, StringFilter, UserFindManyArgs, UserWhereInput};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    // Register the sqlx drivers you need before connecting.
    sqlx::any::install_drivers(&[sqlx::sqlite::any::DRIVER])?;
    let db = An5Client::connect("sqlite:file:app.sqlite?mode=rwc").await?;

    // Typed per-model handle.
    let args = UserFindManyArgs {
        where_: Some(UserWhereInput {
            email: Some(StringFilter {
                contains: Some("@example.com".to_string()),
                ..Default::default()
            }),
            ..Default::default()
        }),
        take: Some(10),
        ..Default::default()
    };
    let users = db.user().find_many(&args).await?;
    println!("{} users", users.len());

    // Or dynamic access, like `db.User` in TypeScript.
    let all = db.table("User").find_many(&Default::default()).await?;
    println!("{} total", all.len());
    Ok(())
}

Rust has no dynamic property access, so a generated method (db.user()) is the equivalent of db.User — matching Go, where the generator emits a real ctx.User field.

Generation

This package is auto-generated by an5Orm/generator. Do not edit files manually.

# Regenerate from schema
cd ../an5Orm
npm run generate

Testing

The package ships generated sources for multiple languages, so the local checks compile each target surface:

npm test
npm run test:package:smoke
npm run test:python
npm run test:dotnet
npm run test:go
npm run test:rust

License

MIT

Metadata

Release files for an5-client 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for an5-client 0.1.4
File Size Uploaded Provenance Actions
an5_client-0.1.4.tar.gz 4.3 kB Without provenance Details for an5_client-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for an5-client 0.1.4
File Interpreter ABI Platform Actions
an5_client-0.1.4-py3-none-any.whl Python 3 none any Details for an5_client-0.1.4-py3-none-any.whl

Total release size: 8.6 kB

Release files / an5_client-0.1.4.tar.gz

Download URL an5_client-0.1.4.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
372aacfcf90cd2a4325669b5ae4a78c0ce7890886b0e1591bf466e9aa9bab95a
BLAKE2b-256 checksum
How to use checksums
1ea412740a32e19abbbe070e28428d310cca604099257146758dbba7c7cd00ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / an5_client-0.1.4-py3-none-any.whl

Download URL an5_client-0.1.4-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1ad8ea03fe5c2c85df02620d6f5f05d2c34a280b20d9ea39bd712cda8904ad3
BLAKE2b-256 checksum
How to use checksums
ba8c448b7f8a058066e4f8b8515657dbda427c8621e0e6252456041e8ebdab78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for an5-client 0.1.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page