SeaORM is a powerful ORM for building web services in Rust
[](https://crates.io/crates/sea-orm)
[](https://github.com/SeaQL/sea-orm/actions/workflows/rust.yml)
[](https://github.com/SeaQL/sea-orm/stargazers/)
Support us with a β !
# π SeaORM
[δΈζζζ‘£](https://github.com/SeaQL/sea-orm/blob/master/README-zh.md)
### Advanced Relations
Model complex relationships 1-1, 1-N, M-N, and even self-referential in a high-level, conceptual way.
### Familiar Concepts
Inspired by popular ORMs in the Ruby, Python, and Node.js ecosystem, SeaORM offers a developer experience that feels instantly recognizable.
### Feature Rich
SeaORM is a batteries-included ORM with filters, pagination, and nested queries to accelerate building REST, GraphQL, and gRPC APIs.
### Production Ready
With 250k+ weekly downloads, SeaORM is production-ready, trusted by startups and enterprises worldwide.
## Getting Started
[](https://discord.com/invite/uCPdDXzbdv)
Join our Discord server to chat with others!
+ [Documentation](https://www.sea-ql.org/SeaORM)
Integration examples:
+ [Actix Example](https://github.com/SeaQL/sea-orm/tree/master/examples/actix_example)
+ [Axum Example](https://github.com/SeaQL/sea-orm/tree/master/examples/axum_example)
+ [GraphQL Example](https://github.com/SeaQL/sea-orm/tree/master/examples/graphql_example)
+ [jsonrpsee Example](https://github.com/SeaQL/sea-orm/tree/master/examples/jsonrpsee_example)
+ [Loco Example](https://github.com/SeaQL/sea-orm/tree/master/examples/loco_example) / [Loco REST Starter](https://github.com/SeaQL/sea-orm/tree/master/examples/loco_starter)
+ [Poem Example](https://github.com/SeaQL/sea-orm/tree/master/examples/poem_example)
+ [Rocket Example](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example) / [Rocket OpenAPI Example](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_okapi_example)
+ [Salvo Example](https://github.com/SeaQL/sea-orm/tree/master/examples/salvo_example)
+ [Tonic Example](https://github.com/SeaQL/sea-orm/tree/master/examples/tonic_example)
+ [Seaography Example (Bakery)](https://github.com/SeaQL/sea-orm/tree/master/examples/seaography_example) / [Seaography Example (Sakila)](https://github.com/SeaQL/seaography/tree/main/examples/sqlite)
If you want a simple, clean example that fits in a single file that demonstrates the best of SeaORM, you can try:
+ [Quickstart](https://github.com/SeaQL/sea-orm/blob/master/examples/quickstart/src/main.rs)
Let's have a quick walk through of the unique features of SeaORM.
## Expressive Entity format
You don't have to write this by hand! Entity files can be generated from an existing database using `sea-orm-cli`,
following is generated with `--entity-format dense` *(new in 2.0)*.
```rust
mod user {
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "user")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub name: String,
#[sea_orm(unique)]
pub email: String,
#[sea_orm(has_one)]
pub profile: HasOne