{"id":20704112,"url":"https://github.com/solidsnack/v2","last_synced_at":"2026-04-21T15:02:29.871Z","repository":{"id":62586934,"uuid":"59918978","full_name":"solidsnack/v2","owner":"solidsnack","description":"Python auto-versioning, for packages, modules and docs","archived":false,"fork":false,"pushed_at":"2017-02-04T07:18:37.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T17:08:18.170Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidsnack.png","metadata":{"files":{"readme":"README.rst","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":"2016-05-28T23:49:59.000Z","updated_at":"2016-05-28T23:50:10.000Z","dependencies_parsed_at":"2022-11-03T22:39:23.326Z","dependency_job_id":null,"html_url":"https://github.com/solidsnack/v2","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Fv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Fv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Fv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Fv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidsnack","download_url":"https://codeload.github.com/solidsnack/v2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242971551,"owners_count":20215030,"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-11-17T01:11:00.859Z","updated_at":"2026-04-21T15:02:29.835Z","avatar_url":"https://github.com/solidsnack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"======\n``v2``\n======\n\n.. image:: https://travis-ci.org/solidsnack/v2.svg?branch=master\n    :target: https://travis-ci.org/solidsnack/v2\n.. image:: https://img.shields.io/pypi/v/v2.svg\n    :target: https://pypi.python.org/pypi/v2\n.. image:: https://img.shields.io/pypi/dd/v2.svg\n    :target: https://pypi.python.org/pypi/v2\n\n``v2`` provides for auto-versioning in an intuitive way.\n\nFrom ``setup.py``:\n\n.. code:: python\n\n    from v2 import v2\n\n    setup(\n          # ...\n          version=v2.from_git().from_file().imprint().version,\n          # ...\n          setup_requires=[..., 'v2', ...],\n    )\n\nFrom within your package root:\n\n.. code:: python\n\n    from v2 import v2\n\n    __version__ = v2.from_pkg().from_git().from_default().version\n\nFrom within your Sphinx ``conf.py``:\n\n.. code:: python\n\n    from v2 import v2\n\n    # ...\n\n    version = v2.from_file('../../VERSION').from_git().version\n\nBy default, ``v2`` looks for and writes to ``VERSION`` in the project root.\nConsequently, a one-line ``MANIFEST.in`` is necessary:\n\n.. code::\n\n    include VERSION\n\n----------\nPrecedence\n----------\n\n``v2`` allows you to control the order in which versions are found, simply by\ncall ``from_file``, ``from_git`` and ``from_pkg`` in the desired order. The\nfirst one found is used; remaining searches are skipped. To obtain the version\nvalue we use ``.version`` (it's always a string).\n\n-------------------\nWriting the Version\n-------------------\n\nThe ``v2`` module's default interface object uses ``VERSION`` as the path to\nits version file. With ``.from_file`` it reads from this file, if present;\nwith ``.imprint`` it writes to this file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidsnack%2Fv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidsnack%2Fv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidsnack%2Fv2/lists"}