Skip to main content

🦉 Version Hawk by Andrew A Levin

Project description

🦅 VersionHawk

VersionHawk is a tool for managing the versions of Python packages based on semantic versioning and the current date. It automatically suggests a new version tag if previous ones are already taken and allows you to fetch a list of all existing versions of a package.

✨ Features

•	Generate a new version: Suggests a unique version tag based on the current date and time.
•	View all versions: Optionally fetches a list of all existing versions of a package on PyPI.
•	User-friendly command-line interface: Easily run it from the terminal.

🔧 Installation

You can install VersionHawk using pip:

pip install versionhawk

🚀 Usage

Once installed, you can run VersionHawk through the versionhawk command in your terminal.

🆕 Generate a New Version

To generate a new version for a package on PyPI, use the following command:

versionhawk <package_name>

Example:

versionhawk requests

📄 View All Versions

To fetch a list of all existing versions of a package on PyPI, use the --versions flag:

versionhawk <package_name> --versions

Example:

versionhawk requests --versions

⚙️ How It Works

VersionHawk uses the current date and time to suggest a new version. It checks the following patterns in order:

•	Year.Month (e.g., 2024.10)
•	Year.Month.Week Number in Month (e.g., 2024.10.3)
•	Year.Month.Day (e.g., 2024.10.22)
•	Year.Month.Day.Hour (e.g., 2024.10.22.20)
•	Year.Month.Day.Hour.Minutes (e.g., 2024.10.22.20.01)
•	Year.Month.Day.Hour.Minutes.Seconds (e.g., 2024.10.22.20.01.30)

VersionHawk checks these patterns against existing versions and suggests the first available unique tag.

💡 Example Usage

Let’s say the current date is 2024-10-22 20:01, and the requests package already has versions up to 2024.10.22.20.01. VersionHawk will suggest the next available version, such as 2024.10.22.20.01.30, if earlier versions are taken.

📦 Dependencies

VersionHawk requires the following dependencies to work:

•	requests — to fetch version information from PyPI.
•	packaging — to correctly sort versions.

These dependencies are automatically installed when you install VersionHawk.

📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

versionhawk-0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

versionhawk-0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file versionhawk-0.3.tar.gz.

File metadata

  • Download URL: versionhawk-0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for versionhawk-0.3.tar.gz
Algorithm Hash digest
SHA256 827b84b632b0b5b1cf9470fd004e5014c364fee9d64f68dc7995737ced46eeca
MD5 7d0b1b000f138c76f0351d389c1bf87b
BLAKE2b-256 a23faacf68c020a4d1d1ca5c75a489709765d5f63c526525462efa38497a3c1c

See more details on using hashes here.

File details

Details for the file versionhawk-0.3-py3-none-any.whl.

File metadata

  • Download URL: versionhawk-0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for versionhawk-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddf3b8db9707094aed7f4dede2c8060e7c717ccaed1a4296bb5954451a89408
MD5 900250f2aff10d504903dbc4aab619e3
BLAKE2b-256 2e404fe6f2d729f7f92c67aca925757d4470711ae3f0bfd385286ff505cf48cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page