https://github.com/agoose77/basic_serialisation
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: agoose77
- Language: Python
- Default Branch: master
- Size: 16.6 KB
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Basic Serialisation
This example demonstrates how to serialise a data structure without polluting the mechanics of what to serialise with how to serialise it.
Adding support for custom types depends upon the object. You might consider having the stream try calling "serialise" on any object provided to it, and the "deserialise" method when operating in reverse, but then you need to tag the stream with the object class (just as is done in Pickle). To avoid this, be explicit. Just call the serialise method yourself.
There are XML and JSON serialisers given as an example. Custom implicit serialisers are defined using "modifiers", which associate with a class type (see stream.Modifier abstract base class). An example is given of using a stream Modifier for serialising Vectors (in this case, my own class, but analogous to the Blender mathutils.Vector class).
In the advanced_example.py, a modifier is used to enable classes to be written directly to the stream (inverting the relationship). This is not necessarily the best practice, but it is a proof of concept.
Owner
- Name: Angus Hollands
- Login: agoose77
- Kind: user
- Location: United Kingdom
- Company: 2i2c
- Twitter: agoose77
- Repositories: 230
- Profile: https://github.com/agoose77
Open Source Infrastructure Engineer @ 2i2c. Executable Books core team member. PhD in Nuclear Physics from the University of Birmingham.
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0