california-midasapi


Namecalifornia-midasapi JSON
Version 0.0.8 PyPI version JSON
download
home_pageNone
SummaryPython wrapper for California's energy price API MIDAS.
upload_time2024-09-03 00:15:41
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords california api energy midas price
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # california-midasapi
A Python wrapper for the California Energy Comission (CEC)'s Market Informed Demand Automation Server (MIDAS) energy price API.  
This API lets you get info about energy prices in California from utilities regulated by the CEC, which is all the big ones (PG&E, SCE, SDG&E, SMUD, etc.) and some smaller municipal utilities. If you have a Rate Identification Number (RIN) QA Code on your electric bill you can use this API to get your electricity price in real time.


## Usage
1. Start by registering an account with MIDAS. There is no webpage for this so I have provided a helper. You only have to register an account once.
```python
from california_midasapi import Midas
response = Midas.register("username", "password", "email@email.email", "Full Name")
print(response)
```
You should see `User account for username was successfully created. A verification email has been sent to email@email.email. Please click the link in the email in order to start using the API.`.  
Click the link in the email, then you can use the rest of the API as described below.

2. Create a `Midas` object:
```python
from california_midasapi import Midas
midas = Midas("username", "password")
```

3. Access the API methods using this object:
```python
# Get basic info about all rates
from california_midasapi.ratelist import RINFilter
rates = midas.GetAvailableRates(RINFilter.TARIFF)
print(rates) # ~40k+ items at writing

# Get specific info about one rate
ratedata = midas.GetRateInfo('USCA-SMSM-AD00-0000')
print(ratedata)
# Get the currently applicable value from a rate (local filtering)
print(ratedata.GetCurrentTariffs())
```


## Contributing
Contributions are welcome, please submit a PR!


## More Information & Thanks
More info about MIDAS can be found at https://midasapi.energy.ca.gov/  
Thank you to the CEC for providing example code at https://github.com/morganmshep/MIDAS-Python-Repository

## Projects using this library


If you have a project using this library, we'd love to hear about it! Let us know and we'll add it to this list.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "california-midasapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "california, api, energy, midas, price",
    "author": null,
    "author_email": "MattDahEpic <matt+california-midasapipypi@mattdahepic.com>",
    "download_url": "https://files.pythonhosted.org/packages/1e/ac/e05e9bed33ecb256c56155d07f72caeddddb4a33a24457f6834ccae4b88c/california_midasapi-0.0.8.tar.gz",
    "platform": null,
    "description": "# california-midasapi\nA Python wrapper for the California Energy Comission (CEC)'s Market Informed Demand Automation Server (MIDAS) energy price API.  \nThis API lets you get info about energy prices in California from utilities regulated by the CEC, which is all the big ones (PG&E, SCE, SDG&E, SMUD, etc.) and some smaller municipal utilities. If you have a Rate Identification Number (RIN) QA Code on your electric bill you can use this API to get your electricity price in real time.\n\n\n## Usage\n1. Start by registering an account with MIDAS. There is no webpage for this so I have provided a helper. You only have to register an account once.\n```python\nfrom california_midasapi import Midas\nresponse = Midas.register(\"username\", \"password\", \"email@email.email\", \"Full Name\")\nprint(response)\n```\nYou should see `User account for username was successfully created. A verification email has been sent to email@email.email. Please click the link in the email in order to start using the API.`.  \nClick the link in the email, then you can use the rest of the API as described below.\n\n2. Create a `Midas` object:\n```python\nfrom california_midasapi import Midas\nmidas = Midas(\"username\", \"password\")\n```\n\n3. Access the API methods using this object:\n```python\n# Get basic info about all rates\nfrom california_midasapi.ratelist import RINFilter\nrates = midas.GetAvailableRates(RINFilter.TARIFF)\nprint(rates) # ~40k+ items at writing\n\n# Get specific info about one rate\nratedata = midas.GetRateInfo('USCA-SMSM-AD00-0000')\nprint(ratedata)\n# Get the currently applicable value from a rate (local filtering)\nprint(ratedata.GetCurrentTariffs())\n```\n\n\n## Contributing\nContributions are welcome, please submit a PR!\n\n\n## More Information & Thanks\nMore info about MIDAS can be found at https://midasapi.energy.ca.gov/  \nThank you to the CEC for providing example code at https://github.com/morganmshep/MIDAS-Python-Repository\n\n## Projects using this library\n\n\nIf you have a project using this library, we'd love to hear about it! Let us know and we'll add it to this list.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python wrapper for California's energy price API MIDAS.",
    "version": "0.0.8",
    "project_urls": null,
    "split_keywords": [
        "california",
        " api",
        " energy",
        " midas",
        " price"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cef37d4eb3bc1b88c0547a8897a948fecfb3776ee21bd765b850014ed20f68a9",
                "md5": "b129bab22c3f49351e33e96a1b10473b",
                "sha256": "7d564932203ea1b14cd852f4aed8498a949a9897ae78260e1a85af4b823ea6f8"
            },
            "downloads": -1,
            "filename": "california_midasapi-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b129bab22c3f49351e33e96a1b10473b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7619,
            "upload_time": "2024-09-03T00:15:40",
            "upload_time_iso_8601": "2024-09-03T00:15:40.391182Z",
            "url": "https://files.pythonhosted.org/packages/ce/f3/7d4eb3bc1b88c0547a8897a948fecfb3776ee21bd765b850014ed20f68a9/california_midasapi-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eace05e9bed33ecb256c56155d07f72caeddddb4a33a24457f6834ccae4b88c",
                "md5": "dfd63ced9fa0dd6b5856ede931dab13c",
                "sha256": "4a58b6f8cd24d6ad0ef520efd190c297097c356ac74f887a19f3d749f2488972"
            },
            "downloads": -1,
            "filename": "california_midasapi-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "dfd63ced9fa0dd6b5856ede931dab13c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7914,
            "upload_time": "2024-09-03T00:15:41",
            "upload_time_iso_8601": "2024-09-03T00:15:41.637300Z",
            "url": "https://files.pythonhosted.org/packages/1e/ac/e05e9bed33ecb256c56155d07f72caeddddb4a33a24457f6834ccae4b88c/california_midasapi-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-03 00:15:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "california-midasapi"
}
        
Elapsed time: 0.32380s