HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
flywhl
cyantic
Python2025–2025
flywhl / cyantic

cyantic

Build complex types from simple blueprints with Pydantic

2Distinct people
3Mentions
0Explicit recommenders
26GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Build complex types from simple blueprints with Pydantic

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day3 dated mentions

Observed mentions: 2025-01-09 14:19:24 UTC to 2025-01-31 12:49:11 UTC.

0122025-01-09 00:00:00 UTC to 2025-01-10 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsJan 92025-01-10 00:00:00 UTC to 2025-01-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-11 00:00:00 UTC to 2025-01-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-12 00:00:00 UTC to 2025-01-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-13 00:00:00 UTC to 2025-01-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-14 00:00:00 UTC to 2025-01-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-15 00:00:00 UTC to 2025-01-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-16 00:00:00 UTC to 2025-01-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-17 00:00:00 UTC to 2025-01-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-18 00:00:00 UTC to 2025-01-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-19 00:00:00 UTC to 2025-01-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-20 00:00:00 UTC to 2025-01-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJan 202025-01-21 00:00:00 UTC to 2025-01-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-22 00:00:00 UTC to 2025-01-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-23 00:00:00 UTC to 2025-01-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-24 00:00:00 UTC to 2025-01-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-25 00:00:00 UTC to 2025-01-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-26 00:00:00 UTC to 2025-01-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-27 00:00:00 UTC to 2025-01-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-28 00:00:00 UTC to 2025-01-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-29 00:00:00 UTC to 2025-01-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-30 00:00:00 UTC to 2025-01-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-31 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJan 31

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 92025-01-09 00:00:00 UTC2025-01-10 00:00:00 UTC211
Jan 102025-01-10 00:00:00 UTC2025-01-11 00:00:00 UTC000
Jan 112025-01-11 00:00:00 UTC2025-01-12 00:00:00 UTC000
Jan 122025-01-12 00:00:00 UTC2025-01-13 00:00:00 UTC000
Jan 132025-01-13 00:00:00 UTC2025-01-14 00:00:00 UTC000
Jan 142025-01-14 00:00:00 UTC2025-01-15 00:00:00 UTC000
Jan 152025-01-15 00:00:00 UTC2025-01-16 00:00:00 UTC000
Jan 162025-01-16 00:00:00 UTC2025-01-17 00:00:00 UTC000
Jan 172025-01-17 00:00:00 UTC2025-01-18 00:00:00 UTC000
Jan 182025-01-18 00:00:00 UTC2025-01-19 00:00:00 UTC000
Jan 192025-01-19 00:00:00 UTC2025-01-20 00:00:00 UTC000
Jan 202025-01-20 00:00:00 UTC2025-01-21 00:00:00 UTC000
Jan 212025-01-21 00:00:00 UTC2025-01-22 00:00:00 UTC000
Jan 222025-01-22 00:00:00 UTC2025-01-23 00:00:00 UTC000
Jan 232025-01-23 00:00:00 UTC2025-01-24 00:00:00 UTC000
Jan 242025-01-24 00:00:00 UTC2025-01-25 00:00:00 UTC000
Jan 252025-01-25 00:00:00 UTC2025-01-26 00:00:00 UTC000
Jan 262025-01-26 00:00:00 UTC2025-01-27 00:00:00 UTC000
Jan 272025-01-27 00:00:00 UTC2025-01-28 00:00:00 UTC000
Jan 282025-01-28 00:00:00 UTC2025-01-29 00:00:00 UTC000
Jan 292025-01-29 00:00:00 UTC2025-01-30 00:00:00 UTC000
Jan 302025-01-30 00:00:00 UTC2025-01-31 00:00:00 UTC000
Jan 312025-01-31 00:00:00 UTC2025-02-01 00:00:00 UTC110

What Hacker News says

3 sources
I do neuro/ai research, so I have to instantiate a lot of Tensors from YAML definitions (that's how I define models declaratively). I built a middleware to simplify this, using intermediary pydantic models as "blueprints" for building complex objects during pydantic's build process. It lets me pass parameters (e.g. mean and standard deviation) into `thing.model_validate(...)`, and get a fully-built Tensor in the appropriate field of the model. https://github.com/flywhl/cyantic --- Example: If you write a blueprint like @blueprint(Tensor) class NormalTensor(Blueprint[Tensor]): mean: float std: float size: tuple[int, ...] def build(self) -> Tensor: return torch.normal(self.mean, self.std, size=self.size) and a data class like class MyModel(CyanticModel): some_tensor: Tensor
Read the rest
you can construct MyModel using mean and std instead of a Tensor: some_yaml = """common: size: [3, 5] some_tensor: mean: 0.0 std: 0.1 size: @value:common.size """ my_model = MyModel.model_validate(yaml.safe_load(some_yaml)) You can also pre-process the data using `@hook` references, and there's an API for defining custom hooks. There's good test coverage and I think the library is ready for use, but would appreciate issues if you come across any bugs. Thanks for reading
In Show HN: Cyantic – build complex objects from simple blueprints with pydantic

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.