dataclass-native 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. dataclass_native/__init__.py +60 -0
  2. dataclass_native/__main__.py +5 -0
  3. dataclass_native/_arrow.py +822 -0
  4. dataclass_native/_json.py +783 -0
  5. dataclass_native/_mode.py +57 -0
  6. dataclass_native/_msgpack.py +207 -0
  7. dataclass_native/_native.py +234 -0
  8. dataclass_native/_runtime.py +607 -0
  9. dataclass_native/_version.py +24 -0
  10. dataclass_native/_wire.py +901 -0
  11. dataclass_native/arrays.py +13 -0
  12. dataclass_native/backends/__init__.py +0 -0
  13. dataclass_native/backends/bindings.py +74 -0
  14. dataclass_native/backends/cpp.py +574 -0
  15. dataclass_native/backends/templates/bindings.cpp.j2 +58 -0
  16. dataclass_native/backends/templates/extensions.cmake.j2 +12 -0
  17. dataclass_native/backends/templates/header.hpp.j2 +75 -0
  18. dataclass_native/cli.py +125 -0
  19. dataclass_native/cmake/dataclass_native-config.cmake +67 -0
  20. dataclass_native/include/dataclass_native/arrow.hpp +2022 -0
  21. dataclass_native/include/dataclass_native/json.hpp +1903 -0
  22. dataclass_native/include/dataclass_native/msgpack.hpp +1513 -0
  23. dataclass_native/include/dataclass_native/python.hpp +594 -0
  24. dataclass_native/include/dataclass_native/reflect.hpp +63 -0
  25. dataclass_native/include/dataclass_native/types.hpp +417 -0
  26. dataclass_native/introspect.py +811 -0
  27. dataclass_native/py.typed +0 -0
  28. dataclass_native/schema.py +553 -0
  29. dataclass_native/types.py +103 -0
  30. dataclass_native-1.0.0.dist-info/METADATA +339 -0
  31. dataclass_native-1.0.0.dist-info/RECORD +35 -0
  32. dataclass_native-1.0.0.dist-info/WHEEL +5 -0
  33. dataclass_native-1.0.0.dist-info/entry_points.txt +2 -0
  34. dataclass_native-1.0.0.dist-info/licenses/LICENSE +21 -0
  35. dataclass_native-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,339 @@
1
+ Metadata-Version: 2.4
2
+ Name: dataclass-native
3
+ Version: 1.0.0
4
+ Summary: Python dataclasses as a data description language, stored in generated C++ (and later Rust) structs
5
+ Author-email: Nick Young <nick.young.github@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Nick Young
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: License :: OSI Approved :: MIT License
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: Programming Language :: Python :: 3 :: Only
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Classifier: Programming Language :: Python :: 3.14
33
+ Classifier: Programming Language :: C++
34
+ Classifier: Operating System :: OS Independent
35
+ Requires-Python: >=3.13
36
+ Description-Content-Type: text/markdown
37
+ License-File: LICENSE
38
+ Requires-Dist: jinja2>=3.1.6
39
+ Provides-Extra: numpy
40
+ Requires-Dist: numpy>=2.5.5; extra == "numpy"
41
+ Provides-Extra: arrow
42
+ Requires-Dist: pyarrow>=26.0.1; extra == "arrow"
43
+ Requires-Dist: tzdata>=2026.6; sys_platform == "win32" and extra == "arrow"
44
+ Dynamic: license-file
45
+
46
+ # dataclass-native
47
+
48
+ Use Python dataclasses as a data description language.
49
+
50
+ Why do this? I'm glad you asked! This approach solves several problems I've wrestled with when creating object models in Python which need to interact with native code implementations for performance reasons. The classic example is quant finance code. My main requirements are:
51
+
52
+ 1. Pythonic data classes, which interact nicely with pyright and other static checkers
53
+ 2. Ability to run the python code without code generation steps
54
+ 3. No-copy semantics when interacting with native code
55
+
56
+ Protobufs fail on points 1. and 2., produce hideous python and require you to distribute the protobuf definitions.
57
+
58
+ AVRO is a bit more friendly but generates its classes dynamically which fails point 1.
59
+
60
+ The approach of dataclass-native is to generate native classes - currently C++, with Rust to follow,
61
+ whose storage the Python classes use directly. Native serialisation (msgpack, Arrow/Parquet) is planned.
62
+
63
+ **Status:** early. Schema introspection, C++ header generation and the native Python binding work. Serialisation
64
+ works to msgpack and to Arrow, in Python and C++, and to Parquet through pyarrow. Rust is to come: see
65
+ [DESIGN.md](DESIGN.md).
66
+
67
+ ## Defining a schema
68
+
69
+ ```python
70
+ import datetime as dt
71
+ from collections.abc import Mapping
72
+ from dataclasses import dataclass
73
+ from enum import Enum, auto
74
+
75
+ from dataclass_native import DiscriminatedUnion, Int32, Shared, native
76
+
77
+
78
+ class Currency(Enum):
79
+ USD = auto()
80
+ EUR = auto()
81
+
82
+
83
+ @native
84
+ @dataclass(frozen=True)
85
+ class Money:
86
+ amount: float
87
+ currency: Currency = Currency.USD
88
+
89
+
90
+ @native(tag="party.v1") # Names the type when serialised
91
+ @dataclass(frozen=True)
92
+ class Party:
93
+ name: str
94
+ rating: Int32 = 0
95
+
96
+
97
+ @native
98
+ @dataclass(frozen=True)
99
+ class Cash:
100
+ money: Money
101
+
102
+
103
+ @native
104
+ @dataclass(frozen=True)
105
+ class Bond:
106
+ isin: str
107
+
108
+
109
+ @native
110
+ @dataclass(frozen=True)
111
+ class Trade:
112
+ id: int
113
+ # Two structs: needs a tag when serialised
114
+ instrument: DiscriminatedUnion[Cash, Bond]
115
+ # Shared, not copied; serialised by reference
116
+ counterparty: Shared[Party]
117
+ tags: tuple[str, ...] = ()
118
+ limits: Mapping[Currency, float] | None = None
119
+ executed: dt.datetime | None = None
120
+ ```
121
+
122
+ Classes are best frozen. One which is not may have its fields set, and what holds it holds that object, not a copy
123
+ of it, as in Python: `order.customer.name = "Ann"` changes the customer. Its containers are still immutable, so are
124
+ set whole.
125
+
126
+ Containers are `tuple[T, ...]`, `tuple[A, B]`, `frozenset[T]` and `Mapping[K, V]`.
127
+
128
+ Beyond the builtin types and those of `datetime`, a field may be a `UUID`, a `NaiveDatetime` (a `datetime` must have a
129
+ timezone), and a `Decimal` of a given number of decimal places: `Annotated[Decimal, DecimalPlaces(2)]`.
130
+
131
+ A field may also be a numpy array of numbers: `points: Vector[np.float64]` or `surface: Matrix[np.float64]`, from
132
+ `dataclass_native.arrays`, or of more dimensions as numpy annotates it:
133
+ `np.ndarray[tuple[int, int, int], np.dtype[np.uint8]]`. Unlike a tuple, it is not copied when read: the array you
134
+ get is a read-only view of the numbers in the C++ struct, or one you may write to if its class is not frozen. This
135
+ needs numpy: install `dataclass-native[numpy]`.
136
+
137
+ A class may also be a pydantic dataclass (`pydantic.dataclasses.dataclass(frozen=True)`), to validate and convert
138
+ what its objects are made from. pydantic's `BaseModel` is not supported, it does unfortunate things like setting `__dict__` directly on objects and has complicated (and rather ugly) code in `__setattr__` etc, which interferes with the descriptors. `BaseModel` and descriptors are generally unhappy bedfellows.
139
+
140
+ ## Generating C++
141
+
142
+ ```shell
143
+ dataclass-native generate cpp --package my_schemas --out generated/include
144
+ dataclass-native include-dir # dataclass_native's own headers, which the generated headers include
145
+ ```
146
+
147
+ This writes a header per module (`my_schemas/trades.hpp`, namespace `my_schemas::trades`) of plain C++20 structs,
148
+ with no dependency on Python:
149
+
150
+ ```cpp
151
+ struct Trade
152
+ {
153
+ std::int64_t id{};
154
+ dataclass_native::DiscriminatedUnion<Cash, Bond> instrument{};
155
+ dataclass_native::Shared<Party> counterparty{};
156
+ std::vector<std::string> tags = std::vector<std::string>{};
157
+ std::optional<std::map<Currency, double>> limits = std::nullopt;
158
+ std::optional<dataclass_native::DateTime> executed = std::nullopt;
159
+
160
+ bool operator==(const Trade&) const = default;
161
+ };
162
+ ```
163
+
164
+ Unchanged files are untouched, so builds don't rerun needlessly.
165
+
166
+ ## Storing Python objects in the structs
167
+
168
+ Each schema module `my_schemas.trades` has an extension module, `my_schemas._trades_native`, generated by
169
+ `dataclass-native generate nanobind` and built with [nanobind](https://nanobind.readthedocs.io). With CMake:
170
+
171
+ ```cmake
172
+ cmake_minimum_required(VERSION 3.25)
173
+ project(my_schemas LANGUAGES CXX)
174
+
175
+ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
176
+
177
+ execute_process(
178
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
179
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
180
+ find_package(nanobind CONFIG REQUIRED)
181
+
182
+ execute_process(
183
+ COMMAND "${Python_EXECUTABLE}" -m dataclass_native cmake-dir
184
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE dataclass_native_ROOT)
185
+ find_package(dataclass_native CONFIG REQUIRED)
186
+
187
+ # Generates the C++ and adds an extension for each schema module of the package, installed alongside it
188
+ dataclass_native_add_extensions(PACKAGES my_schemas PYTHONPATH "${CMAKE_SOURCE_DIR}/src")
189
+ ```
190
+
191
+ The extensions are installed to their packages' directories, as a build backend such as scikit-build-core expects.
192
+ To use them in place instead, add `LIBRARY_DIRECTORY "${CMAKE_SOURCE_DIR}/src"`.
193
+
194
+ A class is then bound to its struct when first instantiated. Nothing else changes: it is still the dataclass you
195
+ wrote, to type checkers and to `dataclasses`.
196
+
197
+ ```python
198
+ party = Party("Acme")
199
+ trade = Trade(id=1, instrument=Cash(Money(100.0)), counterparty=party)
200
+
201
+ trade.instrument.money.amount # 100.0, read from the C++ struct
202
+ trade.counterparty is party # True: shared, not copied
203
+ vars(trade) # {'__native__': <my_schemas._trades_native.Trade object>}
204
+ Trade(id="1", ...) # TypeError: Trade.id cannot be '1'
205
+ ```
206
+
207
+ ## Calling C++ functions
208
+
209
+ A C++ function of the structs is called from Python as a function of the dataclasses. Bind it with nanobind, in an
210
+ extension of your own:
211
+
212
+ ```cpp
213
+ #include "dataclass_native/python.hpp"
214
+ #include "my_schemas/trades.hpp"
215
+
216
+ int rating(const my_schemas::trades::Trade& trade); // Plain C++, knowing nothing of Python
217
+
218
+ NB_MODULE(_risk, m)
219
+ {
220
+ m.def("rating", &rating);
221
+ }
222
+ ```
223
+
224
+ and declare it in Python, naming that extension:
225
+
226
+ ```python
227
+ from dataclass_native import native_function
228
+
229
+
230
+ @native_function("._risk") # my_schemas._risk: relative to this module's package
231
+ def rating(trade: Trade) -> int:
232
+ return trade.counterparty.rating
233
+ ```
234
+
235
+ `rating(trade)` then calls the C++ function with the struct in which the trade's fields are stored, without copying
236
+ it. A struct which C++ returns likewise becomes the object of the return annotation. The body is the function's
237
+ Python implementation, which is what runs in `pure` mode. See [examples/functions](examples/functions).
238
+
239
+ ## Serialising
240
+
241
+ ```python
242
+ from dataclass_native import from_msgpack, to_msgpack
243
+
244
+ data = to_msgpack(trade) # bytes
245
+ from_msgpack(Trade, data) == trade # True
246
+ ```
247
+
248
+ The bytes are msgpack, in the format of [WIRE_FORMAT.md](WIRE_FORMAT.md). An object held by `Shared` fields is
249
+ written once, so the party two trades share is still one object when they are read back.
250
+
251
+ An object stored natively is written and read by C++, and a plain one, as in `pure` mode, by Python. Both write
252
+ the same bytes, so what one writes the other reads. C++ of your own does the same, with no dependency on Python:
253
+
254
+ ```cpp
255
+ #include "dataclass_native/msgpack.hpp"
256
+
257
+ dataclass_native::Bytes data = dataclass_native::msgpack::to_msgpack(trade);
258
+ auto read = dataclass_native::msgpack::from_msgpack<Trade>(data);
259
+ ```
260
+
261
+ ### JSON
262
+
263
+ ```python
264
+ from dataclass_native import from_json, to_json
265
+
266
+ data = to_json(trade) # bytes, of UTF-8
267
+ from_json(Trade, data) == trade # True
268
+ ```
269
+
270
+ In the format of [JSON_FORMAT.md](JSON_FORMAT.md), which pydantic's `TypeAdapter` of the same class reads, and
271
+ writes what this reads. An object held by `Shared` fields is written wherever it is held, so is no longer shared
272
+ when read back. As with msgpack, objects stored natively are written and read by C++, and plain ones by Python,
273
+ character for character the same. In C++ of your own:
274
+
275
+ ```cpp
276
+ #include "dataclass_native/json.hpp"
277
+
278
+ std::string data = dataclass_native::json::to_json(trade);
279
+ auto read = dataclass_native::json::from_json<Trade>(data);
280
+ ```
281
+
282
+ ### Arrow and Parquet
283
+
284
+ ```python
285
+ from dataclass_native import from_parquet, to_arrow, to_parquet
286
+
287
+ tables = to_arrow(trades) # tables.root is a pyarrow.Table, with a row for each trade
288
+ # trades/root.parquet, and a file for each class the trades share
289
+ to_parquet(trades, "trades")
290
+ from_parquet(Trade, "trades") == trades # True
291
+ ```
292
+
293
+ This needs pyarrow: install `dataclass-native[arrow]`. Each field is a column, and an object held by `Shared`
294
+ fields is a row of its class's own table, which those fields refer to by row, as a foreign key does. The layout is
295
+ in [ARROW_FORMAT.md](ARROW_FORMAT.md). A class which holds itself, such as a tree, cannot be written.
296
+
297
+ As with msgpack, objects stored natively are held and read by C++, and plain ones by Python, in the same layout.
298
+ C++ of your own builds the tables with no Arrow library, as the structs of Arrow's C data interface, which any
299
+ Arrow library imports without copying:
300
+
301
+ ```cpp
302
+ #include "dataclass_native/arrow.hpp"
303
+
304
+ auto tables = dataclass_native::arrow::to_arrow<Trade>(std::span<const Trade>(trades));
305
+ // tables.root.schema and tables.root.array: an ArrowSchema and an ArrowArray
306
+ ```
307
+
308
+ Parquet files are written from them, in C++, by an Arrow library which you link: the
309
+ [parquet example](examples/parquet) does so with Arrow C++, writing and reading the files which `to_parquet` and
310
+ `from_parquet` do.
311
+
312
+ ## Modes
313
+
314
+ `DATACLASS_NATIVE_MODE` is one of:
315
+
316
+ - `strict` (the default): fields are stored in the native structs, and a class whose binding is missing raises.
317
+ - `mixed`: as `strict`, but a class whose binding is missing behaves as a plain dataclass.
318
+ - `pure`: `@native` returns every class unchanged, as a plain dataclass, for testing.
319
+
320
+ A `@native_function` follows them: `strict` raises if its native function is missing, `mixed` then calls its body, and
321
+ `pure` always calls its body.
322
+
323
+ A binding built from another version of its class raises in `strict` and `mixed` modes: build it again.
324
+
325
+ ## Examples
326
+
327
+ [examples](examples) has projects to copy from: a schema stored natively and one with C++ functions, each built by
328
+ scikit-build-core, and a C++ program which writes Parquet files with Arrow C++.
329
+
330
+ ## Development
331
+
332
+ ```shell
333
+ uv sync
334
+ uv run pre-commit install # Then ruff and pyright run on committing
335
+ uv run pytest # Builds the extensions of tests/schemas, and the examples, with CMake in build/tests
336
+ ```
337
+
338
+ CI runs the same hooks (`uv run pre-commit run --all-files`) and the tests, on Linux, macOS and Windows.
339
+
@@ -0,0 +1,35 @@
1
+ dataclass_native/__init__.py,sha256=HDA-7TuPyN1avx-ZtL2oTiVXC39HQ20b9AoqjrshOAk,1198
2
+ dataclass_native/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
3
+ dataclass_native/_arrow.py,sha256=WrcJFWxRNNoWgvdgyojv11WQgufAVAOM4rKEA1uFR8A,28326
4
+ dataclass_native/_json.py,sha256=UPVvOSLIPxAQ5nmZ9Kxv3OlbSli2bbsinrWTOpvGQto,26740
5
+ dataclass_native/_mode.py,sha256=x6ifdSM6M5JvPRCEz0VHNCOqyUEG30lodcKj7J7_lcA,1784
6
+ dataclass_native/_msgpack.py,sha256=0zjU7uj7mlZqXVZKTDOYA3UlhEunhfQuz_KP5_kau6w,6401
7
+ dataclass_native/_native.py,sha256=37N_621cKXXTGUeMyUUKVYdS90waJ5c-_ogmy1z5uT0,8491
8
+ dataclass_native/_runtime.py,sha256=6snfZx3x2DBZAJGRIaG1ZG0399BXUZU4JZWJaJmlz5s,20604
9
+ dataclass_native/_version.py,sha256=JAAyU3al4wmBf3BF-Umm1J_GrCIT-yS_yWEGHqKRVHc,520
10
+ dataclass_native/_wire.py,sha256=OwfZx0Q0jlFGVwrJnMFG5bHQG23gPSxxs3qx_l8QIX0,30900
11
+ dataclass_native/arrays.py,sha256=5L2RCNgz9tRXwxP76dNKwDR1XBHiYIjXCaK9goiMCfs,442
12
+ dataclass_native/cli.py,sha256=Hj0bX9Facq-UXY34mTtZnaqfI3ytLmj5ehgUzPWuiRw,3895
13
+ dataclass_native/introspect.py,sha256=W9mIqN1dVq3yxH37eT0K37ISabnhPpSShlUrILgX6uM,28762
14
+ dataclass_native/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ dataclass_native/schema.py,sha256=ZsZ6cPqw9dgaOOroR22kqWwjblm1qURNrdZwgMNMCKI,16397
16
+ dataclass_native/types.py,sha256=Mwo3t-9Vwkz8xNavWN6oD3VwGyFcZgJrCo_J6nndkgI,3105
17
+ dataclass_native/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ dataclass_native/backends/bindings.py,sha256=mGZtHEIgMB1WDCeiLWBxqJD93j6SxnsACByGEN4_dHk,2462
19
+ dataclass_native/backends/cpp.py,sha256=gwacTNt-kSwzCeuZ6iqEfxrT7p4RfHuQlxtxFzt3k2A,20483
20
+ dataclass_native/backends/templates/bindings.cpp.j2,sha256=CqBVtjDpOhHxr-YdLm1Pp2mTCLLqXDyIXTCzi54fXIo,2119
21
+ dataclass_native/backends/templates/extensions.cmake.j2,sha256=ftk5gcaR2Ss2qp8VwZ_p8ziDJtdpuVH_k6E8-MreBdk,314
22
+ dataclass_native/backends/templates/header.hpp.j2,sha256=xHrHhVgiX_diL8Hcw6esQGNDLJao0wy0whn4eJxrdok,2197
23
+ dataclass_native/cmake/dataclass_native-config.cmake,sha256=FuY7Tdc_GC43HENeWIpIa6-ZH0ju1LPLsUYUmCThlpE,3448
24
+ dataclass_native/include/dataclass_native/arrow.hpp,sha256=SMdiqLQ6bUHABuy2AfQGRhZjeWfxPFwo5P4bnzkBTXA,71856
25
+ dataclass_native/include/dataclass_native/json.hpp,sha256=x-s2ouhSfyCHrZV2kfxRO3OTbMY0BXGvTlWhVEkpYBs,70620
26
+ dataclass_native/include/dataclass_native/msgpack.hpp,sha256=U1C87rzAtk43Q4t5PjJVfEPR1xGDO-Jt1OTphel1oEg,55490
27
+ dataclass_native/include/dataclass_native/python.hpp,sha256=gQkJH2bCFTR1qHRsEEC3WcFxmJoa_uPCNS9N5meOUow,24645
28
+ dataclass_native/include/dataclass_native/reflect.hpp,sha256=041__ALp68HuqTQHZstMvn9gMTTN-J7U0-nIV4aW1Es,1957
29
+ dataclass_native/include/dataclass_native/types.hpp,sha256=Xfegx5y9SNWuArTAgudkgah830VZzVU380gFbSmgz7g,12960
30
+ dataclass_native-1.0.0.dist-info/licenses/LICENSE,sha256=Sqb5PaNhM-_U75tuToUj8ONWfUsSV5seXsF73n9ni3o,1067
31
+ dataclass_native-1.0.0.dist-info/METADATA,sha256=ria4Mm3jd2_SqW8rPrwpPd0Mv69f3dfYWSbeCb0yqb0,13399
32
+ dataclass_native-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
33
+ dataclass_native-1.0.0.dist-info/entry_points.txt,sha256=emoJETra-YINZZ2jBX0JLJibjn7BKmIKqKiZ5LQQXJ8,63
34
+ dataclass_native-1.0.0.dist-info/top_level.txt,sha256=VT54fVEIk9HP_9lFIdSl95m6iKyvnXE3wdQaCUmFviA,17
35
+ dataclass_native-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ dataclass-native = dataclass_native.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nick Young
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ dataclass_native