{"id":21668466,"url":"https://github.com/duketemon/pydantic-swift-code","last_synced_at":"2025-10-13T10:01:56.486Z","repository":{"id":263236058,"uuid":"889374002","full_name":"duketemon/pydantic-swift-code","owner":"duketemon","description":"SWIFT/BIC code type using pydantic package","archived":false,"fork":false,"pushed_at":"2024-11-25T17:41:20.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T06:35:55.214Z","etag":null,"topics":["pydantic-models","pydantic-v2","swift","swift-codes"],"latest_commit_sha":null,"homepage":"","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/duketemon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-16T07:51:32.000Z","updated_at":"2024-11-26T05:05:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f0d3738-ee48-4941-bbb1-d71e738d2d78","html_url":"https://github.com/duketemon/pydantic-swift-code","commit_stats":null,"previous_names":["duketemon/pydantic-swift-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/duketemon/pydantic-swift-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duketemon%2Fpydantic-swift-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duketemon%2Fpydantic-swift-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duketemon%2Fpydantic-swift-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duketemon%2Fpydantic-swift-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duketemon","download_url":"https://codeload.github.com/duketemon/pydantic-swift-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duketemon%2Fpydantic-swift-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273593177,"owners_count":25133813,"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-04T02:00:08.968Z","response_time":61,"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":["pydantic-models","pydantic-v2","swift","swift-codes"],"created_at":"2024-11-25T12:16:01.074Z","updated_at":"2025-10-13T10:01:51.381Z","avatar_url":"https://github.com/duketemon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nMicro-package that defines a SWIFT/BIC code type using the Pydantic package\n\n## Installation\nInstall from PyPI\n```commandline\npip install pydantic-swift-code\n```\nInstall from GitHub\n```commandline\npip install git@github.com:duketemon/pydantic-swift-code.git\n```\n\n## Usage\n```python\nfrom pydantic import BaseModel, field_validator\nfrom pydantic_swift_code import SwiftCode\n\nclass BankAccount(BaseModel):\n    ...\n    swift_code: SwiftCode\n\n    @field_validator(\"swift_code\", mode=\"after\")\n    @classmethod\n    def validate_swift_code_after_init(cls, swift_code: str) -\u003e str:\n        \"\"\"Custom validation\"\"\"\n        \n        if swift_code[:4] not in {\"REVO\", \"MONZ\"}:\n            raise ValueError(\"Only Revolut and Monzo swift codes are allowed\")\n        \n        if swift_code[4:6] not in {\"US\", \"GB\"}:\n            raise ValueError(\"Only GB and US swift codes are allowed\")\n        \n        return swift_code\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduketemon%2Fpydantic-swift-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduketemon%2Fpydantic-swift-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduketemon%2Fpydantic-swift-code/lists"}