npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

an5-client

v0.1.5

Published

Generated client artifacts for AN5 ORM - TypeScript types, Python models, .NET entities, Go structs, and Rust, Java, Kotlin, and Swift crate.

Readme

an5Client

Auto-generated client artifacts for AN5 ORM. Contains TypeScript, Python, .NET (C#), Golang, Rust, Java, Kotlin, and Swift 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
├── java/               # Java sources, package an5.client (flat, like dotnet/)
│   ├── User.java        # JavaBean with getters, fluent withX, fromRow/toValues
│   ├── An5DbContext.java# Entry point; one ModelClient<Model> per schema model
│   ├── ModelClient.java # Generic typed table client
│   ├── An5OrmTypes.java # Filters + per-model Where/OrderBy inputs
│   ├── An5Metadata.java # Tables, columns and relations
│   ├── An5Values.java   # Column-value converters
│   └── An5Config.java   # DATABASE_URL / an5.connectionString
├── kotlin/             # Kotlin sources, package an5.client (flat, like java/)
│   ├── User.kt          # data class with fromRow/toValues
│   ├── An5Db.kt         # Entry point; one ModelClient<Model> per schema model
│   ├── An5OrmTypes.kt   # Filter data classes + per-model Where/OrderBy
│   ├── An5Metadata.kt   # Tables, columns and relations
│   └── An5Config.kt     # DATABASE_URL / an5.connectionString
└── swift/              # Swift package (SwiftPM)
    ├── Package.swift    # Package manifest (An5Client)
    └── Sources/An5Client/
        ├── User.swift       # struct with init(row:) and values
        ├── An5Db.swift      # Entry point; one ModelClient<Model> per schema model
        ├── An5OrmTypes.swift# Filter builders + per-model Where/OrderBy
        ├── An5Metadata.swift# Tables, columns and relations
        └── An5Config.swift  # AN5_DATABASE_URL / Info.plist

Wiring a native client into a build

Java and Kotlin ship as sources, the way the .NET client does: add the directory as a source root and depend on the matching runtime (an5Adapters/java or an5Adapters/kotlin, each with its own pom.xml / build.gradle.kts).

Swift ships as a package instead, because SwiftPM has no way to point a target at an arbitrary directory the way a csproj or a go.mod does. Depend on it directly:

.package(path: "../an5Client/swift")
// or, from the released package:
.package(url: "https://github.com/an5ORM/an5Client.git", from: "0.1.4")

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": "[email protected]", "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 = "[email protected]", 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