Python Package semantic-version: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://pypi.org/project/semantic-version/ =Internal= * Python Language * Semantic Versioning in Python#PyPI_Packages|Semantic Versi...")
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:


=Overview=
=Overview=
=requirements.txt=
<syntaxhighlight lang='text'>
semantic-version == 2.10.0
</syntaxhighlight>
=Programming Model=
<syntaxhighlight lang='python'>
from semantic_version import Version
v = Version('1.2.3')
v2 = Version.coerce('1.2')
assert v > v2
</syntaxhighlight>
Getting the string representation of a <code>Version</code> instance.
<syntaxhighlight lang='python'>
?
</syntaxhighlight>

Latest revision as of 04:16, 14 June 2023

External

Internal

Overview

requirements.txt

semantic-version == 2.10.0

Programming Model

from semantic_version import Version

v = Version('1.2.3')
v2 = Version.coerce('1.2')
assert v > v2

Getting the string representation of a Version instance.

?