Skip to main content

Tool to do source bumps

Project description

bumpkin

codecov CI

Tool to do source bumps :jack_o_lantern:

Features

  • Quick information fetch using the defined plugins
$ bumpkin demo basichttp https://discord.com/api/download?platform=osx
INFO:bumpkin.sources.basichttp:Downloading and hashing: https://dl.discordapp.net/apps/osx/0.0.273/Discord.dmg
{'sha256': '54794fbf4b29c9a56f6e8a736ff5445c75a1fd3cf49dce7b4d7aa6ff067ae2ef', 'final_url': 'https://dl.discordapp.net/apps/osx/0.0.273/Discord.dmg'}
  • Evaluation with JSON files. See the examples folder.
$ cat examples/discord.json 
{
  "x86_64-linux": {
    "stable": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download?platform=linux&format=tar.gz"
    },
    "ptb": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download/ptb?platform=linux&format=tar.gz"
    },
    "canary": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download/canary?platform=linux&format=tar.gz"
    }
  },
  "x86_64-darwin": {
    "stable": "https://discord.com/api/download?platform=osx",
    "ptb": "https://discord.com/api/download/ptb?platform=osx",
    "canary": "https://discord.com/api/download/canary?platform=osx"
  },
  "aarch64-darwin": {
    "ptb": "https://discord.com/api/download/ptb?platform=osx"
  }
}

$ bumpkin eval -i examples/discord.json -o /tmp/discord.json 

$ cat /tmp/discord.json  | jq
{
  "x86_64-linux": {
    "stable": {
      "sha256": "581726cbd7f018fab756cd7eee520e47b3a25bf7749193482a9e10e4d458042c",
      "final_url": "https://dl.discordapp.net/apps/linux/0.0.25/discord-0.0.25.tar.gz"
    },
    "ptb": {
      "sha256": "2e80e0de2c0ad7cac3b3353f75010ad3f27c0c8c6bab276c7df959a3c200464b",
      "final_url": "https://dl-ptb.discordapp.net/apps/linux/0.0.39/discord-ptb-0.0.39.tar.gz"
    },
    "canary": {
      "sha256": "d99ad20f23e3dc01eb882599fdb6f7d371f727ded34ee9fffd68e62273449b09",
      "final_url": "https://dl-canary.discordapp.net/apps/linux/0.0.148/discord-canary-0.0.148.tar.gz"
    }
  },
  "x86_64-darwin": {
    "stable": "https://discord.com/api/download?platform=osx",
    "ptb": "https://discord.com/api/download/ptb?platform=osx",
    "canary": "https://discord.com/api/download/canary?platform=osx"
  },
  "aarch64-darwin": {
    "ptb": "https://discord.com/api/download/ptb?platform=osx"
  }
}

How it works

The basic primitive of bumpkin is a source, which is basically a reducer.

The reducer takes some parameters such as the URL, and exposes a reduce method. This method takes the previous state of the result data, or a empty dictionary, changes and then returns the new data. So, if the plugin has some handling to not refetch stuff if the URL or latest version didn't changed, for example, it has everything it needs at hand.

Install it from PyPI

pip install bumpkin

Usage

$ python -m bumpkin
#or
$ bumpkin

Development

Read the CONTRIBUTING.md file.

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

bumpkin-0.0.10.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

bumpkin-0.0.10-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file bumpkin-0.0.10.tar.gz.

File metadata

  • Download URL: bumpkin-0.0.10.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for bumpkin-0.0.10.tar.gz
Algorithm Hash digest
SHA256 072c4e845a21640e5e228c9bac1ad7df1b62460823bcf3c0063bf11d282ccd4f
MD5 123076b2bbe21dd0e5f886471899cb54
BLAKE2b-256 831d6acce692c43e306d07ae2c277d3500219d6a42e84822fc633654562ac6f3

See more details on using hashes here.

File details

Details for the file bumpkin-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: bumpkin-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for bumpkin-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0af9a45bc30a8ceb787b4d5b39e8af54d9327124f0306c8a3c2bb5ceb18a07d5
MD5 b7249e54c9158a88bf5d946438cf7f80
BLAKE2b-256 1d44ed535f9542b2dfbb13f20571dd66d691b9bbc1b2a1309487291d873452d0

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