{"id":23261535,"url":"https://github.com/theinkedengineer/spritz","last_synced_at":"2025-08-20T18:31:18.787Z","repository":{"id":43067974,"uuid":"238627119","full_name":"TheInkedEngineer/Spritz","owner":"TheInkedEngineer","description":"An italian tax number (AKA Codice Fiscale) creator and validator.","archived":false,"fork":false,"pushed_at":"2022-03-20T22:51:49.000Z","size":1252,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-11-27T11:19:16.672Z","etag":null,"topics":["algorithm","algoritmo","code","codice","codicefiscale","fiscale","ios","swift","tax","taxcode"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/TheInkedEngineer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-02-06T06:59:39.000Z","updated_at":"2024-10-14T09:04:44.000Z","dependencies_parsed_at":"2022-09-06T03:42:02.929Z","dependency_job_id":null,"html_url":"https://github.com/TheInkedEngineer/Spritz","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheInkedEngineer%2FSpritz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheInkedEngineer%2FSpritz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheInkedEngineer%2FSpritz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheInkedEngineer%2FSpritz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheInkedEngineer","download_url":"https://codeload.github.com/TheInkedEngineer/Spritz/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230441614,"owners_count":18226406,"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","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":["algorithm","algoritmo","code","codice","codicefiscale","fiscale","ios","swift","tax","taxcode"],"created_at":"2024-12-19T13:33:17.756Z","updated_at":"2024-12-19T13:33:18.482Z","avatar_url":"https://github.com/TheInkedEngineer.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"logo.png\" alt=\"Spritz logo\" width=\"200\"\u003e\n\u003c/p\u003e\n\n[![Twitter](https://img.shields.io/twitter/url/https/theinkedgineer.svg?label=TheInkedgineer\u0026style=social)](https://twitter.com/inkedengineer)\n![SwiftLang badge](https://img.shields.io/badge/language-Swift%205.3-orange.svg)\n\n# Spritz\n\n`Spritz` is an Italian tax code ([codice fiscale](https://en.wikipedia.org/wiki/Italian_fiscal_code)) generator and validator on steroids written in `Swift`.\n\nIt offers anything from simple regex validator, to complex analysis using the user's information, taking into account the [`omocodia`](https://it.wikipedia.org/wiki/Omocodia) phenomenon.\n\nThe library is fully tested and documented.\n\n\n# 1. Requirements and Compatibility\n\n| Swift               | Spritz     |  iOS     |\n|---------------------|------------|----------|\n|       5.1+          | 1.0.x      |  10+     |\n|       5.3+          | 2.0.x      |  10+     |\n\n# 2. Installation\n\n## Swift Package Manager\n\n#### Package.swift\n\nOpen your `Package.swift` file and add the following as your dependency. \n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/TheInkedEngineer/Spritz\", from: \"2.0.0\")\n]\n```\n\nThen add the following to your target's dependency:\n\n```swift\ntargets: [\n  .target(\n    name: \"MyTarget\", \n    dependencies: [\n      .product(name: \"https://github.com/TheInkedEngineer/Spritz\", package: \"Spritz\")\n    ]\n  )\n]\n```\n\n#### Xcode\n\n1. Open your app in Xcode\n1. In the **Project Navigator**, click on the project\n1. in the Project panel, click on the project\n1. Go to the **Package Dependencies** tab\n1. Click on the `+` button\n1. Insert the `https://github.com/TheInkedEngineer/Spritz` url in the search bar and press **Enter**\n1. Click on the `Add Package` button\n1. Follow the Xcode's dialog to install the SDK\n\n# 3. Documentation\n\n`Spritz` is fully documented. Checkout the documentation [**here**](https://theinkedengineer.github.io/Spritz/Documentation/documentation/spritz/index.html).\n\n# 4. Code Example\n\n## Generating a `Codice Fiscale`\n\n```swift\nlet data = Spritz.Models.CodiceFiscaleData(\n  firstName: \"First\",\n  lastName: \"last\",\n  dateOfBirth: Spritz.Models.Date(day: 2, month: .april, year: 1987)!,\n  sex: .female,\n  placeOfBirth: .foreign(countryName: \"francia\")\n)\n\nlet codice = try? Spritz.generateCF(from: data)\n```\n\n## Validating a `Codice Fiscale`\n\n```swift\nlet result = Spritz.isValid(\"LSTFST89B44B354F\")\n```\n\n## Validating a `Codice Fiscale` against data\n\n```swift\nlet data = Spritz.Models.CodiceFiscaleData(\n  firstName: \"First\",\n  lastName: \"last\",\n  dateOfBirth: Spritz.Models.Date(day: 2, month: .april, year: 1987)!,\n  sex: .female,\n  placeOfBirth: .foreign(countryName: \"francia\")\n)\n    \nlet result = Spritz.isCorrect(fiscalCode: \"LSTFST89B44B354F\", for: data)\n```\n\n# 5. Contribution\n\n**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheinkedengineer%2Fspritz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheinkedengineer%2Fspritz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheinkedengineer%2Fspritz/lists"}