Pydantic Python Models that represent the UN Transparency Protocol
jsyro / untp-models Goto Github PK
View Code? Open in Web Editor NEWPydantic Python Models that represent the UN Transparency Protocol
License: GNU General Public License v3.0
Pydantic Python Models that represent the UN Transparency Protocol
License: GNU General Public License v3.0
Pydantic Python Models that represent the UN Transparency Protocol
Manually or broadly add optional
behaviour to all attributes of all (or some classes).
AnyURL pydantic types are not json serializable, so urls are validated as str
.
I've tried defining a custom json_encoder, but the pydantic type is not actually an AnyURL
object, so I was not able to detect the right class.
A solution to this would properly leverage pydantic's url validation, but also allow for a successful json.dumps(<model>.dict())
of a class with a URI field.
When the UNTP publishes schema or vocabs, this library should import those by default to avoid required an unanchored vocab value.
Do you plan to licence this code?
a pydantic expression of spec-untp seems like a handy thing for python users, especially with all the first generation untp stuff happening in the js/ts ecosystem. But without an open source licence that’s compatible with people’s projects, they might be reluctant to use it (or contribute back).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.