CategoricalData / hydra

Transformations transformed
Apache License 2.0
64 stars 9 forks source link

Add a Python coder #80

Open joshsh opened 1 year ago

joshsh commented 1 year ago

Prior to having an actual Hydra implementation in Python (#66), we will need a two-level Python coder (schemas and data/programs). This will be useful for Python functionality aimed at TinkerPop, for populating Jupyter notebooks with data and, for internal purposes at LinkedIn, etc.

joshsh commented 1 year ago

See https://github.com/CategoricalData/hydra/tree/feature-80-python.

joshsh commented 8 months ago

Note: at this time it is unclear what whether a schema encoding for Python is even meaningful, given that Python is schemaless. Meanwhile, the best data encoding for Python is simply JSON, which is already supported. Leaving this ticket open for now in case mapping of programs into Python becomes interesting in the medium- or long-term, which it is likely to.

joshsh commented 5 months ago

Actually... as of Python 3.7 (released almost five years ago), Python does have "dataclasses", which have a record-like syntax, e.g.

@dataclass
class Point:
     x: int
     y: int

These can probably serve as a target for many datatype definitions.