semvec/pypi-packages huggingface dataset:
greenmountainpower 0.0.6
This is an unofficial Python client that uses the undocumented API for Green Mountain Power accounts.
License: MIT
Requires Python: <4.0,>=3.7

# Green Mountain Power

This is an unofficial Python client that uses the undocumented API for Green Mountain Power accounts.

## Quickstart

To start using this client, install it using pip.

```sh
pip3 install greenmountainpower
```

And then import the client and use it to fetch usage data.

```python
import datetime
import greenmountainpower

print("Collecting usage...")

gmp = greenmountainpower.api.GreenMountainPowerApi(
    account_number=58504395849, username="jsmith", password="mypassword"
)

now = datetime.datetime.now()
one_day_ago = now - datetime.timedelta(days=1)
usages = gmp.get_usage(
    precision=greenmountainpower.api.UsagePrecision.HOURLY,
    start_time=one_day_ago,
    end_time=now,
)

for usage in usages:
    print(f" - Time: {usage.start_time.isoformat()}, Usage: {usage.consumed_kwh} KWH")

```

Output:

```
Collecting usage...
 - Time: 2021-11-14T01:00:00, Usage: 0.27 KWH
 - Time: 2021-11-14T02:00:00, Usage: 0.22 KWH
 - Time: 2021-11-14T03:00:00, Usage: 0.24 KWH
 - Time: 2021-11-14T04:00:00, Usage: 0.25 KWH
 - Time: 2021-11-14T05:00:00, Usage: 0.26 KWH
 - Time: 2021-11-14T06:00:00, Usage: 0.26 KWH
 ...
```

## Publishing

To publish a new version, follow these steps.

```sh
git tag <version> # ensure all changes are committed
python3 -m build # build the package
twine upload --repository pypi dist/*
```
git-profile 1.1.4
Easily switch between Git configurations on a per-repository basis.
License: MIT
Requires Python: >=3.8

# git-profile

This command-line tool allows you to define a set of configuration profiles that can be applied on
a per-repository basis. The main use case is to swap the user details and signing key, but it's
not limited to just that.

## Installation

We recommend installing the tool with Pipx.

    $ pipx install git-profile

## Configuration

In `~/.gitconfig`, prefixing section names with `<Profile>.` assigns them to the specified profile.
Git-profile can use that information to determine which profiles there are and what configuration
is associated with it.

Example:

```ini
[Work.user]
  email = "me@work.com"
  signingkey = DEADBEEFDEADBEEF
```

## Usage

Run `git profile` to list available profiles. The current profile will be marked with a star. Note
that the `default` profile is always present and represents your normal Git configuration without
profile overrides.

    $ git profile
    * default
      Work

With `git profile <Profile>` you can switch to the specified profile.

    $ git profile Work
    Switched to profile "Work".

The changes will be applied to `.git/config` of the current repository.

You can add the `--diff` option to print a diff of the applied config changes.

## FAQ

### How do I avoid accidentally forgetting to switch my profile after checking out a repository?

You can leave the `[user]` section of your default configuration empty. That way Git will prompt
you to configure it when trying to commit. Simply run `git profile <Profile>` after that and
commit again.

## Vendored Libraries

* [`gitconfigparser.py`](https://github.com/looking-for-a-job/gitconfigparser.py)
  by looking-for-a-job @ GitHub

---

<p align="center">Copyright &copy; 2012 Niklas Rosenstein</p>