DynamicObj 8.0.0
DynamicObj
F# library supporting Dynamic Objects including inheritance in functional style.
The library is compatible with Fable, allowing transpilation to javascript and python.
The primary use case of DynamicObj is the extension of F# classes with dynamic properties. This is useful when you want to add arbitrarily typed properties to a class at runtime.
Why would you want to do that?
Yes, The type system is one of the core strengths of F#, and it is awesome. However, there are cases where a static domain model is either unfeasible or not flexible enough, especially when interfacing with dynamic languages such as JavaScript or Python.
DynamicObj is transpilable into JS and Python via Fable, meaning you can use it to create classes that are usable in both .NET and those languages, while making their usage (e.g., the setting of dynamic properties) both safe in .NET and idiomatic in JS/Python.
Docs
Documentation is hosted at https://csbiology.github.io/DynamicObj/
Development
Requirements
- nodejs and npm
- verify with
node --version(Tested with v18.16.1) - verify with
npm --version(Tested with v9.2.0)
- verify with
- .NET SDK
- verify with
dotnet --version(Tested with 7.0.306)
- verify with
- Python and uv
- verify with
py --version(Tested with 3.12.2, known to work only for >=3.11) - verify with
uv --version(Tested with 0.11.15)
- verify with
Local Setup
On windows you can use the setup.cmd to run the following steps automatically!
Setup dotnet tools
dotnet tool restoreInstall NPM dependencies
npm installSetup python environment
py -m venv .venvInstall python dependencies
uv pip install -r pyproject.toml
Verify correct setup with ./build.cmd runtests ✨
Showing the top 20 packages that depend on DynamicObj.
| Packages | Downloads |
|---|---|
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
35 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
34 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
33 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
31 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
30 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
29 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
27 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
26 |
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀.
|
25 |
Breaking changes.
- Update Fable tooling and test dependencies to Fable 5.1.0,
fable-library5.1.0, andFable.Pyxpecto2.0.0. - JavaScript and Python builds now store dynamic members through the internal
Propertiesdictionary instead of mirroring them as native object attributes. UseSetProperty,TryGetDynamicPropertyHelper,GetPropertyHelpers, orGetPropertiesto work with dynamic members. - Fix JavaScript and Python dynamic-property enumeration so compiler-generated backing fields are not returned as dynamic members.
- Fix Python deep copy for
ResizeArrayvalues by handling native Python lists before the DynamicObj-only collection cases. - Fix Python native
==andhash()interop so it matchesDynamicObjstructural equality and hashing.
.NET Standard 2.0
- FSharp.Core (>= 10.1.300)
- Fable.Core (>= 4.3.0)
| Version | Downloads | Last updated |
|---|---|---|
| 8.0.0 | 6 | 06/10/2026 |
| 7.1.0 | 25 | 04/04/2026 |
| 7.0.1 | 26 | 04/04/2026 |
| 7.0.0 | 25 | 04/04/2026 |
| 6.0.0 | 25 | 04/04/2026 |
| 5.0.0 | 27 | 04/04/2026 |
| 4.0.3 | 31 | 04/04/2026 |
| 4.0.2 | 27 | 04/04/2026 |
| 4.0.1 | 23 | 04/04/2026 |
| 4.0.0 | 25 | 04/04/2026 |
| 3.1.0 | 27 | 04/04/2026 |
| 3.0.0 | 26 | 04/04/2026 |
| 2.0.0 | 25 | 04/04/2026 |
| 1.0.1 | 26 | 04/04/2026 |
| 1.0.0 | 28 | 04/04/2026 |
| 0.2.1 | 24 | 04/04/2026 |
| 0.2.0 | 25 | 04/04/2026 |
| 0.1.0 | 27 | 04/04/2026 |
| 0.0.3 | 23 | 04/04/2026 |
| 0.0.2 | 23 | 04/04/2026 |
| 0.0.1 | 19 | 04/04/2026 |