[{"data":1,"prerenderedAt":496},["ShallowReactive",2],{"project-47364260":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":47,"post_text":49,"what":50,"said":92,"maker_in_thread":226,"shape":239,"grid":243,"attempts":458,"same_week":459,"maker_shows":44,"maker_hidden":488,"reader_version":489,"card":490},"47364260","Oxyde","Pydantic-native async ORM with a Rust core","title","Show HN: Oxyde – Pydantic-native async ORM with a Rust core","https:\u002F\u002Fgithub.com\u002Fmr-fatalyst\u002Foxyde","github.com","mr_Fatalyst",1773408912,2026,155,81,415,4366,10,"notable","dev_tools","orm","library",[24,25,26,27,28],"python orm","pydantic","async orm","fastapi","django-style queries","debated",0.143,{"positive":32,"neutral":33,"mixed":34,"critical":32},11,9,1,32,{"idea":37,"design":40,"privacy":42,"performance":43,"execution":45,"docs":46},{"positive":38,"critical":39},3,0,{"positive":41,"critical":41},6,{"positive":39,"critical":34},{"positive":34,"critical":44},2,{"positive":34,"critical":34},{"positive":39,"critical":39},[38,34,38,39,48,39,39,39,39,39,34,39,48,34,48,39,39,34,39,48,39,38,38,34,34,34,34,38,48,48,48,38,48,39,39,39,39,34,38,38],5,"Hi HN! I built Oxyde because I was tired of duplicating my models.\n\nIf you use FastAPI, you know the drill. You define Pydantic models for your API, then define separate ORM models for your database, then write converters between them. SQLModel tries to fix this but it's still SQLAlchemy underneath. Tortoise gives you a nice Django-style API but its own model system. Django ORM is great but welded to the framework.\n\nI wanted something simple: your Pydantic model IS your database model. One class, full validation on input and output, native type hints, zero duplication. The query API is Django-",{"problem":51,"audience":57,"pricing":62,"motivation":63,"time_to_build":62,"stack":67,"openness":90,"stage":91,"team_size":90},{"value":52,"source":53,"evidence":54},"Duplicated models: separate Pydantic API schemas and ORM models with converters between them","maker",[55],{"id":56},"post",{"value":58,"source":59,"evidence":60},"Python developers using FastAPI and Pydantic","inferred",[61],{"id":56},null,{"value":64,"source":53,"evidence":65},"Tired of duplicating models between API and database layers",[66],{"id":56},[68,72,76,80,86],{"value":69,"source":53,"evidence":70},"Python",[71],{"id":56},{"value":73,"source":53,"evidence":74},"Rust",[75],{"id":56},{"value":77,"source":53,"evidence":78},"Pydantic",[79],{"id":56},{"value":81,"source":53,"evidence":82},"sqlx",[83],{"id":84,"by":11,"text":85},"47364632","Just pip install oxyde, that's it. The Rust core (oxyde-core) ships as pre-built wheels for Linux, macOS, and Windows, so no Rust toolchain needed. Python-side dependencies are…",{"value":87,"source":53,"evidence":88},"MessagePack",[89],{"id":56},"unknown","beta",{"praise":93,"objections":124,"requests":150,"questions":165,"alternatives":184},[94,106,116],{"value":95,"source":96,"evidence":97},"Pydantic models as single source for API and DB, less duplication","commenter",[98,102],{"id":99,"by":100,"text":101},"47407136","Onavo","With this you don't need to have two sources of truth on the backend. Previously you will end up with one set of DB ORM level validation and a second set of validation on the…",{"id":103,"by":104,"text":105},"47408327","ryan14975","The coupling concern is valid but I think it's the right trade-off for most CRUD apps. In practice, 80% of your endpoints are thin wrappers around your models anyway. The…",{"value":107,"source":96,"evidence":108},"Explicit no lazy loading avoids N+1 queries",[109,113],{"id":110,"by":111,"text":112},"47420795","wei03288","The IR-over-MessagePack boundary is a genuinely interesting design choice, but it shifts where complexity lives rather than eliminating it. You're trading SQLAlchemy's internal…",{"id":114,"by":11,"text":115},"47410257","That's exactly why Oxyde has no lazy loading at all. If you don't call .join() or .prefetch(), related data simply won't be there. N+1 is impossible by design, not by discipline.",{"value":117,"source":96,"evidence":118},"Auto-generated admin panel is useful",[119,120],{"id":103,"by":104,"text":105},{"id":121,"by":122,"text":123},"47406657","jgauth","This looks great, and like it could address a need in ecosystem. Also, the admin dashboard is such a great feature of django, nice job building it from the get-go.",[125,136,143],{"value":126,"source":96,"evidence":127},"Coupling API and DB models can cause drift and refactoring problems",[128,132],{"id":129,"by":130,"text":131},"47411674","hrmtst93837","Merging DB and API models in Python sounds tempting until you refactor one thing and get mysterious field breakage somewhere else. The moment your schema and DB structure…",{"id":133,"by":134,"text":135},"47405958","roel_v","Why would one want to couple these two? Doesn't that couple, say, your API interface with your database schema? Whereas in reality these are separate concepts, even if, yes,…",{"value":137,"source":96,"evidence":138},"Rust core adds native dependency and unclear performance benefit",[139],{"id":140,"by":141,"text":142},"47408830","never_inline","1. AI Slop Post 2. \"\"\"You define Pydantic models for your API, then define separate ORM models for your database, then write converters between them.\"\"\" So you could've written…",{"value":144,"source":96,"evidence":145},"Stringly-typed F() references weaken type safety",[146],{"id":147,"by":148,"text":149},"47406079","instig007","> But infrastructure stuff like SQL generation, connection pooling, and row serialization is where a systems language makes sense. not really, what makes sense is being JIT-able…",[151,158],{"value":152,"source":96,"evidence":153},"Rename detection in migrations",[154],{"id":155,"by":156,"text":157},"47412109","Paulo75","I've wasted so many hours keeping API schemas and ORM models in sync on FastAPI projects.. how does it handle schema evolution on larger projects? Like if I rename a field or…",{"value":159,"source":96,"evidence":160},"Programmatic way to initialise a fresh database",[161],{"id":162,"by":163,"text":164},"47408396","fishgoesblub","Is it possible to initialise a fresh database without manually running commands to run migrations? I'm not seeing anything in the docs to do so.",[166,170,177],{"value":167,"source":96,"evidence":168},"How does schema evolution handle renames and model splits",[169],{"id":155,"by":156,"text":157},{"value":171,"source":96,"evidence":172},"Dependencies needed to deploy",[173],{"id":174,"by":175,"text":176},"47364542","throwawayffffas","Lol I never knew django orm is faster than SQLAlchemy. But having used both that makes sense. > Why Rust? ... Rust handles the database plumbing. Queries are built as an IR in…",{"value":178,"source":96,"evidence":179},"Is it used in production",[180],{"id":181,"by":182,"text":183},"47408000","unconscionable","This is great. Are there any live sites running it in production? Django + async is a nightmare so this is a very welcome project.",[185,196,204,212,219],{"value":186,"source":96,"evidence":187},"SQLModel",[188,192],{"id":189,"by":190,"text":191},"47405703","ForHackernews","This sounds great and there's a real gap in the ecosystem for a tool like this. https:\u002F\u002Fsqlmodel.tiangolo.com\u002F looked promising but it's actually worse than useless because if…",{"id":193,"by":194,"text":195},"47406576","whinvik","Yeah I have always struggled to figure out why I would use SQLModel. Big fan of FastAPI but I think SQLModel leads to the wrong mental model that somehow db model and api schema…",{"value":197,"source":96,"evidence":198},"SQLAlchemy",[199,203],{"id":200,"by":201,"text":202},"47409767","murkt","Seeing a new library in 2026 that uses Django-style filter syntax is really surprising. With SQLAlchemy approach I can easily find all usages of a particular column everywhere.…",{"id":193,"by":194,"text":195},{"value":205,"source":96,"evidence":206},"Django ORM",[207,211],{"id":208,"by":209,"text":210},"47406200","knrz","Lowkey hope this replaces Django ORM",{"id":174,"by":175,"text":176},{"value":213,"source":96,"evidence":214},"Prisma",[215],{"id":216,"by":217,"text":218},"47406958","kevinqi","I think Prisma does type-safe ORM really well on the typescript side, and was sad it doesn't seem to be super supported in python. This feels sort of similar and makes a lot of…",{"value":220,"source":96,"evidence":221},"django-ninja",[222],{"id":223,"by":224,"text":225},"47411813","outlines","This is pretty similar to what django-ninja offers as well with their Schema modeling [1]. I found it to be a big help personally and always wanted something for fastapi.…",{"comments":227,"answered":228,"key":229},25,7,[230,233,236],{"id":231,"text":232},"47405990","The ORM doesn't force you to use the DB model as your API schema. It's a regular Pydantic BaseModel, so you can make separate request\u002Fresponse schemas whenever you need to. For…",{"id":234,"text":235},"47407318","Exactly, that's the idea.",{"id":237,"text":238},"47405765","Thanks! Yeah, that SQLModel issue is actually one of the things that pushed me to build this. In Oxyde the models are just Pydantic BaseModel subclasses, so validation always…",{"commenters":240,"max_depth":48,"maker_replies":227,"first_comment_mins":241,"lifespan_hours":242},45,22,247,[244,246,248,250,251,254,258,262,266,268,270,274,278,280,284,287,290,294,296,300,302,305,308,310,312,314,316,320,324,327,328,331,335,338,340,342,346,349,352,353,354,356,359,361,364,366,368,369,371,372,374,376,377,379,382,385,387,389,394,397,399,403,405,409,411,414,416,420,424,427,429,431,434,437,440,441,443,446,448,450,452,456],[133,39,38,245,134,39],"project\u002Fneutral\u002Fidea",[231,39,39,247,11,34],"maker\u002Fneutral\u002Fdesign",[193,39,34,249,194,39],"project\u002Fcritical\u002Fdesign",[129,39,34,249,130,39],[252,39,38,245,253,39],"47406835","giovannibonetti",[255,39,38,256,257,39],"47408477","project\u002Fneutral\u002Fnone","nine_k",[259,39,39,260,261,39],"47494433","commenter\u002Fneutral\u002Fnone","gcr",[263,39,39,264,265,39],"47406884","other\u002Fneutral\u002Fidea","miki123211",[99,39,48,267,100,39],"project\u002Fpositive\u002Fdesign",[234,39,39,269,11,34],"maker\u002Fpositive\u002Fdesign",[271,39,39,272,273,39],"47407482","commenter\u002Fneutral\u002Fdesign","gavmor",[275,39,39,276,277,39],"47409551","other\u002Fneutral\u002Fnone","ramon156",[279,39,39,260,273,39],"47417904",[281,39,39,282,283,39],"47407459","other\u002Fcritical\u002Fidea","ElectricalUnion",[285,39,39,276,286,39],"47407748","bb88",[288,39,39,289,257,39],"47408533","other\u002Fcritical\u002Fperformance",[291,39,39,292,293,39],"47407925","other\u002Fneutral\u002Fdesign","whalesalad",[295,39,39,292,257,39],"47408564",[297,39,39,298,299,39],"47416864","other\u002Fneutral\u002Fperformance","LtWorf",[301,39,39,298,257,39],"47416924",[303,39,39,292,304,39],"47416899","globular-toast",[306,39,34,307,261,39],"47494422","project\u002Fcritical\u002Fprivacy",[189,34,39,309,190,39],"other\u002Fcritical\u002Fexecution",[237,34,39,311,11,34],"maker\u002Fpositive\u002Fexecution",[174,44,48,313,175,39],"project\u002Fpositive\u002Fperformance",[84,44,39,315,11,34],"maker\u002Fneutral\u002Fdocs",[317,44,38,318,319,39],"47407675","project\u002Fneutral\u002Fperformance","unrealhoang",[321,44,34,322,323,39],"47405588","project\u002Fcritical\u002Fperformance","kstrauser",[325,44,39,326,11,34],"47405820","maker\u002Fneutral\u002Fperformance",[103,38,48,267,104,39],[329,38,39,330,11,34],"47410158","maker\u002Fpositive\u002Fnone",[332,333,39,276,334,39],"47407008",4,"luckycharms810",[336,333,39,276,337,39],"47407341","bognition",[339,333,39,276,293,39],"47407984",[341,333,39,298,299,39],"47416938",[343,48,34,344,345,39],"47406307","project\u002Fcritical\u002Fnone","waterTanuki",[347,48,39,348,11,34],"47406347","maker\u002Fneutral\u002Fnone",[350,48,39,276,351,39],"47410726","ljm",[223,41,48,267,224,39],[216,228,48,267,217,39],[355,228,39,330,11,34],"47407218",[357,358,39,292,304,39],"47413581",8,[360,358,39,247,11,34],"47413928",[362,358,38,363,304,39],"47414612","project\u002Fneutral\u002Fdesign",[365,358,39,247,11,34],"47414860",[367,358,34,249,304,39],"47425732",[121,33,48,267,122,39],[370,33,39,247,11,34],"47406799",[200,18,34,249,201,39],[373,18,39,247,11,34],"47410038",[375,18,34,249,201,39],"47411471",[147,32,34,322,148,39],[378,32,39,247,11,34],"47406175",[380,32,34,381,148,39],"47406444","project\u002Fcritical\u002Fexecution",[383,32,39,384,11,34],"47406523","maker\u002Fneutral\u002Fexecution",[155,386,38,245,156,39],12,[388,386,39,315,11,34],"47412312",[390,391,48,392,393,39],"47422646",13,"project\u002Fpositive\u002Fexecution","corv",[208,395,48,396,209,39],14,"project\u002Fpositive\u002Fidea",[398,395,39,348,11,34],"47406232",[400,401,48,396,402,39],"47412555",15,"roflcopter69",[404,401,39,348,11,34],"47416171",[406,407,48,396,408,39],"47408558",16,"JSR_FDED",[410,407,39,313,11,34],"47410059",[162,412,38,413,163,39],17,"project\u002Fneutral\u002Fdocs",[415,412,39,413,11,34],"47410136",[417,418,48,267,419,39],"47411290",18,"Gri22lyBear",[421,422,39,282,423,39],"47406092",19,"TZubiri",[425,422,39,426,11,34],"47406201","commenter\u002Fneutral\u002Fidea",[428,422,39,260,423,39],"47406972",[430,422,39,245,11,34],"47407294",[432,422,39,276,433,39],"47407993","abybaddi009",[435,422,39,264,436,39],"47406345","zamalek",[438,422,39,289,439,39],"47407403","fhub",[114,422,39,313,11,34],[140,442,34,249,141,39],20,[444,442,39,445,11,34],"47410192","commenter\u002Fneutral\u002Fperformance",[181,447,38,256,182,39],21,[449,447,39,256,11,34],"47410223",[110,241,38,451,111,39],"project\u002Fmixed\u002Fdesign",[453,454,38,318,455,39],"47409309",23,"openclaw01",[457,454,39,318,11,34],"47410231",[],[460,465,470,475,479,483],{"id":461,"name":462,"points":463,"category":464},"47344548","s@",414,"languages",{"id":466,"name":467,"points":468,"category":469},"47378781","Hacker News archive (open-index)",408,"data",{"id":471,"name":472,"points":473,"category":474},"47427299","SVG backgrounds",403,"creative",{"id":476,"name":477,"points":478,"category":20},"47400868","Godogen",337,{"id":480,"name":481,"points":482,"category":20},"47412569","zeroboot",311,{"id":484,"name":485,"points":486,"category":487},"47428650","Will my flight have Starlink?",276,"consumer_social",false,"v2",{"id":491,"name":5,"line":6,"ai":488,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":492,"top":18,"kw":493,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":494,"url":9,"mix":495,"praise":95,"objection":126,"sub":21},47364260,0.14,[24,25,26,27,28],"3130500000105150010503311113555350000133",[32,33,34,32],1793991147884]