Skip to main content

Quickly set up and tear down Heroku apps!

Project description

https://img.shields.io/travis/grampajoe/happy.svg https://img.shields.io/coveralls/grampajoe/happy.svg https://img.shields.io/scrutinizer/g/grampajoe/happy.svg

Quickly set up and tear down Heroku apps!

Quickly starting

Add an app.json manifest that looks kinda like this:

{
  "name": "My App Thing",
  "repository": "https://github.com/helloitsme/thingy",
  "env": {
    "FROBULATION_LIMIT": {
      "description": "Maximum frobulations per lunar cycle.",
      "value": "7"
    }
  },
  "addons": [
    "pusher"
  ]
}

Push that to your thing’s master branch on GitHub so Heroku can find it.

Log in with the Heroku toolbelt , then do this:

$ pip install happy
$ happy up butt-man-123
Creating app... butt-man-123
Building... done
It's up! :) https://butt-man-123.herokuapp.com

That’s it! You made a temporary app with all the fixins, which you can use to continuously integrate or whatever you want to do.

Then, you can get rid of it like:

$ happy down butt-man-123
Are you sure you want to delete butt-man-123? [y/N]: y
Destroying app butt-man-123... done
It's down. :(

Commands

up

Usage: happy up [OPTIONS] [APP_NAME]

Brings up a Heroku app.

The app name is stored in a file called .happy in the working directory so happy can find it later.

  • APP_NAME

    (optional) Name of the Heroku app to create. If this is not given, one is chosen for you by the Heroku API.

  • --auth-token

    (optional) Heroku API auth token. If this is not given, happy assumes you’re logged in through Heroku CLI, i.e. your token is stored in your netrc file.

  • --env

    (optional) Environment variable overrides, e.g. --env KEY=value. For multiple variables, this option can be passed more than once. Variable names MUST match one of the names in the env section of your app.json, or the build will fail with an invalid app.json message.

  • --tarball-url

    (optional) URL of the tarball containing app.json. If this is not given, happy tries to infer it from an app.json file in the current directory.

down

Usage: happy down [OPTIONS] [APP_NAME]

Brings down a Heroku app.

  • APP_NAME

    (optional) Name of the Heroku app to delete. If this is not given, the app name is read from a file called .happy in the working directory.

  • --auth-token

    (optional) Heroku API auth token. If this is not given, happy assumes you’re logged in through Heroku CLI, i.e. your token is stored in your netrc file.

  • --force

    (optional) Suppress the delete confirmation prompt. Useful for automation!

Running the tests

  1. Install tox with pip install tox.

  2. Run the tests with tox.

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

happy-1.2.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

happy-1.2.1-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file happy-1.2.1.tar.gz.

File metadata

  • Download URL: happy-1.2.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for happy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 e198c77b379789682fa2b1e010dfbe2000024062de10a980811737bf43d2d3da
MD5 7342b5f5cfc730936ad8b1c12e5475c9
BLAKE2b-256 68b8ee1613a7411bcb3e5bc8627263b4dc4118787fffd542323f08872125d02c

See more details on using hashes here.

File details

Details for the file happy-1.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for happy-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 df030b3111873e2fcbbf562ebc75ffc32152c2f6f1575c21e83da766f8912fe4
MD5 a89345c586ac918a2fc6831cbae763e1
BLAKE2b-256 92c9106f881e96c78d767f58950e97796e8a615439650840c13afeb7bbda5d82

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