{"id":19720845,"url":"https://github.com/quantopian/serializable-traitlets","last_synced_at":"2025-09-12T02:15:07.673Z","repository":{"id":57471675,"uuid":"48727906","full_name":"quantopian/serializable-traitlets","owner":"quantopian","description":"JSON-Serializable IPython Traitlets","archived":false,"fork":false,"pushed_at":"2023-04-07T02:42:18.000Z","size":66,"stargazers_count":13,"open_issues_count":0,"forks_count":12,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-08-27T00:20:30.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantopian.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-29T04:46:21.000Z","updated_at":"2022-02-10T12:09:45.000Z","dependencies_parsed_at":"2024-11-11T23:12:46.651Z","dependency_job_id":"cd2a1b5c-cfeb-4986-8ef0-c9d483fb729e","html_url":"https://github.com/quantopian/serializable-traitlets","commit_stats":{"total_commits":70,"total_committers":6,"mean_commits":"11.666666666666666","dds":0.4,"last_synced_commit":"f7de75507978e08446a15894a8417997940ea7a6"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/quantopian/serializable-traitlets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantopian%2Fserializable-traitlets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantopian%2Fserializable-traitlets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantopian%2Fserializable-traitlets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantopian%2Fserializable-traitlets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantopian","download_url":"https://codeload.github.com/quantopian/serializable-traitlets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantopian%2Fserializable-traitlets/sbom","scorecard":{"id":755175,"data":{"date":"2025-08-11","repo":{"name":"github.com/quantopian/serializable-traitlets","commit":"f7de75507978e08446a15894a8417997940ea7a6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":2,"reason":"Found 4/17 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T21:27:55.740Z","repository_id":57471675,"created_at":"2025-08-22T21:27:55.741Z","updated_at":"2025-08-22T21:27:55.741Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274743114,"owners_count":25341133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:12:41.220Z","updated_at":"2025-09-12T02:15:07.648Z","avatar_url":"https://github.com/quantopian.png","language":"Python","readme":"======================\nserializable-traitlets\n======================\nSerializable IPython Traitlets\n\n``serializable-traitlets`` (imported as ``straitlets``) is a Python 2/3\ncompatible library providing a restricted subset of the classes from `IPython\nTraitlets`_.  Within our restricted subset, we inherit all the benefits of\nusing regular ``traitlets``, including static type declarations, `dynamic\ndefault generators`_, and `attribute observers/validators`_.\n\nBy supporting only a limited (though still expressive) subset of Python\nobjects, however, we gain the ability to serialize and deserialize instances of\n``Serializable`` to and from various formats, including:\n\n#. JSON\n#. YAML\n#. base64-encoded strings\n\nThese properties make ``Serializables`` well-suited for configuration in\nenvironments where objects need to be transferred between processes.\n\n``straitlets`` also provides users the ability to specify ``example`` values\nfor traits.  If all traits of a ``Serializable`` class have examples (or\ndefault values) provided, then we can auto-generate an example for the parent\nclass, and we can resursively generate examples for nested classes.\n\nUsage\n-----\n\n**Basic Usage:**\n\n.. code-block:: python\n\n   In [1]: from straitlets import Serializable, Integer, Dict, List\n   In [2]: class Foo(Serializable):\n      ...:     my_int = Integer()\n      ...:     my_dict = Dict()\n      ...:     my_list = List()\n\n   In [3]: instance = Foo(my_int=3, my_dict={'a': [1, 2], 'b': (3, 4)}, my_list=[5, None])\n\n   In [4]: print(instance.to_json())\n   {\"my_int\": 3, \"my_dict\": {\"a\": [1, 2], \"b\": [3, 4]}, \"my_list\": [5, null]}\n\n   In [5]: print(instance.to_yaml())\n   my_dict:\n   a:\n   - 1\n   - 2\n   b:\n   - 3\n   - 4\n   my_int: 3\n   my_list:\n   - 5\n   - null\n\n**Autogenerating Example Values:**\n\n.. code-block:: python\n\n   from straitlets import Serializable, Integer, Instance\n\n   class Point(Serializable):\n       x = Integer().example(0)\n       y = Integer().example(0)\n\n\n   class Vector(Serializable):\n       # We can automatically generate example values for attributes\n       # declared as Instances of Serializable.\n       head = Instance(Point)\n\n       # Per-attribute overrides are still supported.\n       tail = Instance(Point).example(Point(x=1, y=3))\n\n   print(Vector.example_instance().to_yaml())\n   # head:\n   #   x: 0\n   #   y: 0\n   # tail:\n   #   x: 1\n   #   y: 3\n\n.. _`IPython Traitlets` : http://traitlets.readthedocs.org\n.. _`dynamic default generators` : http://traitlets.readthedocs.org/en/stable/using_traitlets.html#dynamic-default-values\n.. _`attribute observers/validators` : http://traitlets.readthedocs.org/en/stable/using_traitlets.html#callbacks-when-trait-attributes-change\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantopian%2Fserializable-traitlets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantopian%2Fserializable-traitlets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantopian%2Fserializable-traitlets/lists"}