{"id":37064803,"url":"https://github.com/headsrooms/fistro","last_synced_at":"2026-01-14T07:34:42.707Z","repository":{"id":57429783,"uuid":"142418879","full_name":"headsrooms/fistro","owner":"headsrooms","description":"A fixture generator based on type annotations.","archived":false,"fork":false,"pushed_at":"2022-02-12T19:59:03.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-12T03:05:05.606Z","etag":null,"topics":["annotations","dataclasses","fixture-data","fixture-generator","fixture-test","fixtures","python","test","testing-library","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/headsrooms.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2018-07-26T09:25:07.000Z","updated_at":"2024-01-24T20:37:37.000Z","dependencies_parsed_at":"2022-08-26T04:43:02.525Z","dependency_job_id":null,"html_url":"https://github.com/headsrooms/fistro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/headsrooms/fistro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headsrooms%2Ffistro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headsrooms%2Ffistro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headsrooms%2Ffistro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headsrooms%2Ffistro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/headsrooms","download_url":"https://codeload.github.com/headsrooms/fistro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/headsrooms%2Ffistro/sbom","scorecard":{"id":459016,"data":{"date":"2025-08-11","repo":{"name":"github.com/headsrooms/fistro","commit":"b2a2c1cd086b2a964a8688c7581a93f5d300ff69"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-19T10:35:27.470Z","repository_id":57429783,"created_at":"2025-08-19T10:35:27.470Z","updated_at":"2025-08-19T10:35:27.470Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["annotations","dataclasses","fixture-data","fixture-generator","fixture-test","fixtures","python","test","testing-library","testing-tools"],"created_at":"2026-01-14T07:34:42.019Z","updated_at":"2026-01-14T07:34:42.695Z","avatar_url":"https://github.com/headsrooms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fistro\n======\n\n![pypi](https://img.shields.io/pypi/v/fistro)\n[![codecov](https://codecov.io/gh/headsrooms/fistro/branch/master/graph/badge.svg?token=7lhLh5bRD5)](https://codecov.io/gh/headsrooms/fistro)\n    \n\nA fixture generator based on type annotations.\n\nExamples\n--------\n\n```python\nfrom dataclasses import dataclass\nfrom datetime import datetime, date\nfrom typing import List\n\nfrom fistro.fistro import generate\n\n\n@dataclass\nclass Employee:\n   id: int\n   birthday: date\n   last_access: datetime\n   password: str\n   number_plates: List[int]\n   name: str = 'Carlos Sánchez'\n\nemployee = generate(Employee)()\nprint(employee)\n ```\n\nIt will show something like this:\n\n```python\nEmployee(id=5809893100, birthday=datetime.date(559, 3, 6), last_access=datetime.datetime(1053, 8, 29, 19, 11, 14), password=\"iFZ\u003e?)V0'\", number_plates=[85863115, 3528889142, 2818728907, 6043092538, 4985672707], name='Carlos Sánchez')\n```\n\n\n`generate` function can be called with `to_json` or `to_dict`\nboolean pararameters to return json or dict\nrepresentation respectively:\n\n```python\nclass AreaOfCompany(BaseModel):                     \n    enable: bool                                    \n    riskOwner: str                                  \n    description: str                                \n    name: str                                       \n    code: str\n    \nprint(fistro.generate(AreaOfCompany, as_dict=True))\n```\n\n    \u003e\u003e\u003e {'enable': True, 'riskOwner': 'LqPqS\\x0c{kZ', 'description': 'k1917GvOV', 'name': '`;ORxzQ7i', 'code': 'w2 |P\\rEps'}\n\n```python\nprint(fistro.generate(AreaOfCompany, as_json=True))\n```\n\n    \u003e\u003e\u003e {\"enable\": true, \"riskOwner\": \"h@Ij34u?H\", \"description\": \",R,G%0\u003cy#\", \"name\": \"K4.\\u000b:lK!}\", \"code\": \"fvitVYrk3\"}\n\nAnother useful functions are `generate_from_json` and `get_class_body_from_annotations`:\n\n```python\nfrom json import loads\n\nfrom fistro.fistro import generate_from_json, get_class_body_from_annotations\n\nspecific_str = \"\"\"{\n            \"_id\": \"5ae09b3947467b00111e7bf6\",\n            \"localExposure\": 0,\n            \"answer\": \"mitigate\",\n            \"idRisk\": \"5ae09b3947467b00111e7bf6\",\n            \"version\": 4,\n            \"country\": \"BR\",\n            \"company\": \"0185\",\n            \"currency\": \"BRL\",\n            \"zone\": \"DIRT8\",\n            \"internalRef\": \"RSP-BR-0185-DIRT8-105\",\n            \"creationDate\": \"2017-12-13T23:00:00.000Z\",\n            \"title\": \"Tributário: Contribuições Previdenciárias sobre Plano de Stock Options\",\n            \"riskCategory\": {\n                \"es\": \"22. Contingencias tributarias\",\n                \"en\": \"22. Tax contingencies\",\n                \"pt\": \"22. Contingências Fiscais\"\n            },\n            \"evaluationType\": \"quantitative\",\n            \"basicRef\": \"26376309-2cc2-4a0d-9c6a-373e0a7d9043\",\n            \"localQUANTITATIVENetCASHFLOW\": 0,\n            \"euroQUANTITATIVENetCASHFLOW\": 0,\n            \"localQUANTITATIVEGrossCASHFLOW\": 241000000,\n            \"euroQUANTITATIVEGrossCASHFLOW\": 57324742,\n            \"probability\": \"veryPossible\",\n            \"status\": \"open\",\n            \"commissionApproval\": false,\n            \"companyRegistry\": true,\n            \"companyCode\": \"0185\",\n            \"IDNotification\": \"0aa0370e-e6d6-405c-a619-a47da0602dee\",\n            \"localQUANTITATIVEGrossOIBDA\": 241000000,\n            \"localQUANTITATIVEGrossCAPEX\": 0,\n            \"localQUANTITATIVENetOIBDA\": 0,\n            \"localQUANTITATIVENetCAPEX\": 0,\n            \"euroQUANTITATIVEGrossOIBDA\": 57324742,\n            \"euroQUANTITATIVEGrossCAPEX\": 0,\n            \"euroQUANTITATIVENetOIBDA\": 0,\n            \"euroQUANTITATIVENetCAPEX\": 0,\n            \"hierarchy\": \"principal\",\n            \"hierarchySubsidiaries\": [],\n            \"owner\": \"Vasco Gruber\"\n        }\"\"\"\n\nspecific_json = loads(specific_str)\n\nthe_class = generate_from_json(specific_json)\nprint(get_class_body_from_annotations(the_class.__annotations__))\n```\n\n\nIt will print:\n\n```python\n_id: str\nlocalExposure: int\nanswer: str\nidRisk: str\nversion: int\ncountry: str\ncompany: str\ncurrency: str\nzone: str\ninternalRef: str\ncreationDate: str\ntitle: str\nriskCategory: typing.Dict[str, str]\nevaluationType: str\nbasicRef: str\nlocalQUANTITATIVENetCASHFLOW: int\neuroQUANTITATIVENetCASHFLOW: int\nlocalQUANTITATIVEGrossCASHFLOW: int\neuroQUANTITATIVEGrossCASHFLOW: int\nprobability: str\nstatus: str\ncommissionApproval: bool\ncompanyRegistry: bool\ncompanyCode: str\nIDNotification: str\nlocalQUANTITATIVEGrossOIBDA: int\nlocalQUANTITATIVEGrossCAPEX: int\nlocalQUANTITATIVENetOIBDA: int\nlocalQUANTITATIVENetCAPEX: int\neuroQUANTITATIVEGrossOIBDA: int\neuroQUANTITATIVEGrossCAPEX: int\neuroQUANTITATIVENetOIBDA: int\neuroQUANTITATIVENetCAPEX: int\nhierarchy: str\nhierarchySubsidiaries: typing.List[typing.Any]\nowner: str\n```\n\n\nInstallation\n------------\n\n    pip install fistro\n\n\nCredits\n--------\nIn memoriam of [Chiquito de la Calzada](https://es.wikipedia.org/wiki/Chiquito_de_la_Calzada).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadsrooms%2Ffistro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheadsrooms%2Ffistro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheadsrooms%2Ffistro/lists"}