semvec/pypi-packages huggingface dataset:
california-midasapi 1.1.0
Python wrapper for California's energy price API MIDAS.
Keywords: california, api, energy, midas, price

# 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) QR 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
[ha-midas](https://github.com/MattDahEpic/ha-midas): A Home Assistant integration to expose MIDAS rate data to your smart home

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.
ai-storyteller 0.1
The AI Storyteller - where your imagination meets state-of-the-art AI creativity.
Keywords: storyteller, ai, storyteller-ai

===========
Storyteller
===========
AI Storyteller - where your imagination meets state-of-the-art AI creativity.

MCP
===
Locally
-------
We need two instances:

- MCP server
- MEDIA server

ATM, the Marimo app has MEDIA server functionality. For local inference, we
can use that.

As a pre-requisite, both processed, need to be given this:

.. code-block:: sh

    export DISABLE_HTTPS_ENFORCEMENT=1
    export DISABLE_AUTHENTICATION=1
    export OPENAI_API_KEY='ollama'
    export OPENAI_BASE_URL='http://127.0.0.1:11434/v1'

    export STORYTELLER_MEDIA_PATH='/Users/me/repos/ai-storyteller/media'
    export STORYTELLER_MEDIA_URL='http://localhost:8000/media/'

    export STORYTELLER_OUTPUT_PATH='/Users/me/repos/ai-storyteller/output'
    export STORYTELLER_OUTPUT_MEDIA_URL='http://localhost:8000/media/output/'

    export STORYTELLER_TOOL_MODEL_PROVIDER='openai'
    export STORYTELLER_TOOL_MODEL_NAME='gpt-5-mini'
    export STORYTELLER_STORY_MODEL_NAME='o4-mini'
    export STORYTELLER_IMAGE_DESCRIPTOR_MODEL_NAME='gpt-4.1-mini'

Then start the MEDIA server (FastAPI/Playground):

.. code-block:: sh

    make run

Then start the MCP server in HTTP mode (FastAPI):

.. code-block:: sh

    make mcp

To start the AI chat (with storyteller tool), type:

.. code-block:: sh

    make chat

License
=======

MIT

Authors
=======

- Artur Barseghyan
- Dale Richardson