{"id":16499182,"url":"https://github.com/hardbyte/pyflick","last_synced_at":"2026-06-10T17:31:36.453Z","repository":{"id":79897786,"uuid":"299197696","full_name":"hardbyte/PyFlick","owner":"hardbyte","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-28T05:27:56.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T07:50:14.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardbyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-28T05:26:44.000Z","updated_at":"2020-09-28T05:27:58.000Z","dependencies_parsed_at":"2023-05-31T09:30:42.344Z","dependency_job_id":null,"html_url":"https://github.com/hardbyte/PyFlick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hardbyte/PyFlick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2FPyFlick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2FPyFlick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2FPyFlick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2FPyFlick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardbyte","download_url":"https://codeload.github.com/hardbyte/PyFlick/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2FPyFlick/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34163253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T14:51:26.099Z","updated_at":"2026-06-10T17:31:36.408Z","avatar_url":"https://github.com/hardbyte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyFlick\nA quick and dirty Python API for [Flick Electric](https://flickelectric.co.nz).\n\n**Don't be evil** - This library has been designed to minimize hitting the Flick API as much as possible by caching data in files for later retrieval. Be a #cleverflickster and make sure you are respectful and responsible when consuming this API.\n\n### Getting Started\n\nFirst things first, clone the repo:\n\n```bash\ngit clone git@github.com:driannaude/PyFlick.git\n```\n\nYou will need to create a JSON config file in `src/` called config.json that contains your `username`, `password`, `client_id` and `client_secret`:\nYou can use the client id/secret below, or find your own by sniffing the request from your phone/app with any reputable MITM tool\n```json\n{\n  \"client_id\": \"le37iwi3qctbduh39fvnpevt1m2uuvz\",\n  \"client_secret\": \"ignwy9ztnst3azswww66y9vd9zt6qnt\",\n  \"username\": \"email@example.com\",\n  \"password\": \"SuperSecretPassword\"\n}\n```\n\nYou can then initialize the API like this:\n\n```python\nconfig = Config().get()\napi = FlickApi(config[\"username\"], config[\"password\"], config[\"client_id\"], config[\"client_secret\"])\n```\n\nAlternatively, you can manually pass in your credentials as arguments to the FlickAPI class init method.\n\n### Usage\n\nThe following methods are available:\n\n|Method |Arguments |Returns |\n|-------|----------|:--------|\n|`getRawData()`| `None`| `Returns` Raw `JSON` object ([see below](#raw-json-data)) |\n|`getPricePerKwh()`| `None`| `Returns` Price Per KwH |\n|`getPriceBreakdown()`| `None`| `Returns` dict with Charges and price|\n|`getLastUpdateTime()`| `Bool isEpoch` | `Returns` last updated timestamp, pass `True` value for `isEpoch` to get UTC seconds since Epoch |\n|`getNextUpdateTime()`| `Bool isEpoch` | `Returns` next update timestamp, pass `True` value for `isEpoch` to get UTC seconds since Epoch | |\n\n\n### Raw JSON Data\nthis will return a price object that looks a little like this:\n\n```json\n{\n  \"kind\": \"mobile_provider_price\",\n  \"customer_state\": \"active\",\n  \"needle\": {\n    \"price\": \"19.862\",\n    \"status\": \"urn:flick:market:price:forecast\",\n    \"unit_code\": \"cents\",\n    \"per\": \"kwh\",\n    \"start_at\": \"2017-09-08T03:30:00Z\",\n    \"end_at\": \"2017-09-08T03:59:59Z\",\n    \"now\": \"2017-09-08T03:53:34.985Z\",\n    \"type\": \"rated\",\n    \"charge_methods\": [\"kwh\", \"spot_price\"],\n    \"components\": [{\n      \"charge_method\": \"kwh\",\n      \"value\": \"0.113\"\n    }, {\n      \"charge_method\": \"kwh\",\n      \"value\": \"1.5\"\n    }, {\n      \"charge_method\": \"kwh\",\n      \"value\": \"10.773\"\n    }, {\n      \"charge_method\": \"spot_price\",\n      \"value\": \"7.476\"\n    }]\n  }\n}\n```\n\n### Disclaimer/Legal\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Fpyflick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardbyte%2Fpyflick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Fpyflick/lists"}