{"id":22114021,"url":"https://github.com/plinss/sem_ver","last_synced_at":"2025-03-24T04:44:51.585Z","repository":{"id":57465469,"uuid":"237837207","full_name":"plinss/sem_ver","owner":"plinss","description":"Mirror of https://gitlab.linss.com/open-sourece/sem_ver","archived":false,"fork":false,"pushed_at":"2020-06-16T03:10:15.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-18T09:41:59.114Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plinss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-02T21:09:46.000Z","updated_at":"2020-05-07T21:51:43.000Z","dependencies_parsed_at":"2022-09-13T13:50:59.445Z","dependency_job_id":null,"html_url":"https://github.com/plinss/sem_ver","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plinss%2Fsem_ver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plinss%2Fsem_ver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plinss%2Fsem_ver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plinss%2Fsem_ver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plinss","download_url":"https://codeload.github.com/plinss/sem_ver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212172,"owners_count":20578440,"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":[],"created_at":"2024-12-01T11:08:21.891Z","updated_at":"2025-03-24T04:44:51.566Z","avatar_url":"https://github.com/plinss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sem_ver\n\nThis package contains a parser for Semantic Version labels complete with type annotations. \n\nIn addition to parsing version labels they may be compared via standard comparison operators \nand modified directly.\nNote that comparison operators, including equality, do not consider build information.\nTo test for equality including build information, convert to, and compare strings.\nSemVer objects may be directly compared to strings, or other objects that can be converted to strings,\na `ValueError` will be raised if the other object is not a valid SemVer.\n\nSee https://semver.org for details.\n\n### sem_ver.SemVer\n\n#### sem_ver.validate(version: str) -\u003e bool\n\nTest if string is a valid SemVer.\n\n#### sem_ver.compare(version_a: str, version_b: str) -\u003e int\n\nCompare two SemVer strings.\nWill raise `ValueError` if either string is not a valid SemVer.\n\n#### sem_ver.force(version: str) -\u003e Optional[SemVer]\n\nUse relaxed parsing rules to attempt to create a SemVer.\nReturns `None` if no version info found.\n\n#### SemVer(version: str = None, major: int = 0, minor: int = 0, patch: int = 0, prerelease: Union[str, Sequence[Union[int, str]]] = '', build: Union[str, Sequence[str]] = '')\n\nConstructor.\nWill raise `ValueError` if the passed version string does not match the proper format.\n\n#### SemVer.major: int\n\nMajor version.\nChanging the major version will reset the minor, patch, prerelease, and build versions.\n\n#### SemVer.minor: int\n\nMinor version.\nChanging the minor version will reset the patch, prerelease, and build versions.\n\n#### SemVer.patch: int\n\nPatch version.\nChanging the patch version will reset the prerelease and build versions.\n\n#### SemVer.prerelease: Optional[str]\n\nPrerelease tags as a single string.\nWill raise `ValueError` if the prerelease string does not match the proper format.\n\n#### SemVer.prereleases: List[Union[int, str]]\n\nPrerelease tags as a list of int or string.\nDoes not validate the strings.\n\n#### SemVer.build: Optional[str]\n\nBuild labels as a single string.\nWill raise `ValueError` if the build string does not match the proper format.\n\n#### SemVer.builds: List[str]\n\nBuild labels as a list of strings.\nDoes not validate the strings.\n\n#### SemVer.next_major() -\u003e SemVer\n\nCreate a new SemVer for the next major release.\nMinor, patch, prerelease, and build will be reset.\n\n#### SemVer.next_minor() -\u003e SemVer\n\nCreate a new SemVer for the next minor release.\nPatch, prerelease, and build will be reset.\n\n#### SemVer.next_patch() -\u003e SemVer\n\nCreate a new SemVer for the next patch release.\nPrerelease and build will be reset.\n\n#### SemVer.__str__() -\u003e str\n\nConvert to string.\n\n### Installation\n\nInstall with pip:\n\n    pip install sem_ver","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplinss%2Fsem_ver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplinss%2Fsem_ver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplinss%2Fsem_ver/lists"}