{
"info": {
"author": "Jason Antman",
"author_email": "jason@jasonantman.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Home Automation",
"Topic :: Internet",
"Topic :: System :: Monitoring",
"Topic :: System :: Networking :: Monitoring"
],
"description": "xfinity-usage\n=============\n\n.. image:: https://www.repostatus.org/badges/latest/unsupported.svg\n :alt: Project Status: Unsupported \u2013 The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.\n :target: https://www.repostatus.org/#unsupported\n\nPython/selenium script to get Xfinity bandwidth usage from Xfinity MyAccount website. Has an easily-usable\ncommand line entrypoint as well as a usable Python API, and an entrypoint to send usage to Graphite.\n\nThis is a little Python script I whipped up that the `selenium-python `_\npackage to log in to your Xfinity account and screen-scrape the data usage. By default the usage is just printed\nto STDOUT. You can also use the ``XfinityUsage`` class from other applications or scripts; see the\ndocstrings on the ``__init__`` and ``run`` methods for information. There are also options to send the data\nto a Graphite server.\n\nFor the changelog, see `CHANGES.rst in the GitHub project `_.\n\nDevelopment Discontinued - Maintainer Wanted\n--------------------------------------------\n\nAs of September 2018, AT&T Fiber has become available in my area and I've switched to that because of the much better pricing (I'm getting 300Mbps *symmetrical* for the same monthly price as Xfinity 100/10). As such, I won't be able to continue maintaining this project without an Xfinity account. If anyone would like to take over maintenance, please open an Issue on GitHub and I'll contact you.\n\nRequirements\n------------\n\n- Python (tested with 2.7; should work with 3.3+ as well)\n- `selenium `_ Python package\n- One of the supported browsers:\n\n - A recent version of PhantomJS installed on your computer; this should be 2.0+, and the script is tested with 2.1.1.\n - Google Chrome or Chromium and `chromedriver `_\n - Firefox and `Geckodriver `_\n\nInstallation\n------------\n\n pip install xfinity-usage\n\nUsage\n-----\n\nCommand Line\n++++++++++++\n\nExport your Xfinity username as the ``XFINITY_USER`` environment\nvariable, your password as the ``XFINITY_PASSWORD`` environment\nvariable, and run the ``xfinity-usage`` entrypoint. See ``xfinity-usage -h`` and the\ntop-level docstring in the script for more information.\n\nI'd highly recommend not leaving your username and password hard-coded\nanywhere on your system, but the methods for securing credentials are\nvaried enough that the choice is yours.\n\nNote that this screen-scrapes their site; it's likely to break with a\nredesign.\n\nPython API\n++++++++++\n\nSee the source of the ``xfinity_usage.py`` script, specifically the ``__init__``\nand ``run`` methods of the ``XfinityUsage`` class. As a simple example:\n\n.. code-block:: pycon\n\n >>> import os\n >>> from xfinity_usage.xfinity_usage import XfinityUsage\n >>> u = XfinityUsage(os.environ['XFINITY_USER'], os.environ['XFINITY_PASSWORD'], browser_name='chrome-headless')\n >>> u.run()\n {\n \"data_timestamp\": 1523913455,\n \"units\": \"GB\",\n \"used\": 224.0,\n \"total\": 1024.0,\n \"raw\": {\n \"courtesyUsed\": 0,\n \"courtesyRemaining\": 2,\n \"courtesyAllowed\": 2,\n \"inPaidOverage\": false,\n \"usageMonths\": [\n {\n \"policyName\": \"1 Terabyte Data Plan\",\n \"startDate\": \"10/01/2017\",\n \"endDate\": \"10/31/2017\",\n \"homeUsage\": 408.0,\n \"allowableUsage\": 1024.0,\n \"unitOfMeasure\": \"GB\",\n \"devices\": [\n {\n \"id\": \"AB:CD:EF:01:23:45\",\n \"usage\": 301.0\n },\n {\n \"id\": \"12:34:56:78:90:AB\",\n \"usage\": 107.0\n }\n ],\n \"additionalBlocksUsed\": 0.0,\n \"additionalCostPerBlock\": 10.0,\n \"additionalUnitsPerBlock\": 50.0,\n \"additionalIncluded\": 0.0,\n \"additionalUsed\": 0.0,\n \"additionalPercentUsed\": 0.0,\n \"additionalRemaining\": 0.0,\n \"billableOverage\": 0.0,\n \"overageCharges\": 0.0,\n \"overageUsed\": 0.0,\n \"currentCreditAmount\": 0,\n \"maxCreditAmount\": 0,\n \"policy\": \"limited\"\n },\n # 5 additional months removed for brevity\n {\n \"policyName\": \"1 Terabyte Data Plan\",\n \"startDate\": \"04/01/2018\",\n \"endDate\": \"04/30/2018\",\n \"homeUsage\": 224.0,\n \"allowableUsage\": 1024.0,\n \"unitOfMeasure\": \"GB\",\n \"devices\": [\n {\n \"id\": \"12:34:56:78:90:AB\",\n \"usage\": 224.0\n }\n ],\n \"additionalBlocksUsed\": 0.0,\n \"additionalCostPerBlock\": 10.0,\n \"additionalUnitsPerBlock\": 50.0,\n \"additionalIncluded\": 0.0,\n \"additionalUsed\": 0.0,\n \"additionalPercentUsed\": 0.0,\n \"additionalRemaining\": 0.0,\n \"billableOverage\": 0.0,\n \"overageCharges\": 0.0,\n \"overageUsed\": 0.0,\n \"currentCreditAmount\": 0,\n \"maxCreditAmount\": 0,\n \"policy\": \"limited\"\n }\n ]\n }\n }\n\nNote About Reliability\n----------------------\n\nIn short: xfinity's site isn't terribly reliable. Personally, I run this\nscript twice an hour via cron, so 48 times a day, every day. I usually\nsee 1-4 failures a day of all different failure modes - elements missing\nfrom the page, connection resets, blank pages, server-side error\nmessages, etc. Keep that in mind. My code could probably do more in\nterms of error handling and retries, but it's not *that* important to\nme.\n\nRationale\n---------\n\nComcast recently started rolling out a 1TB/month bandwidth cap in my\narea. I've gone over my two \"courtesy\" months, and the overage fees are\npretty insane. I work from home, and sometimes that uses a lot of\nbandwidth. I want to know when I'm getting close to my limit; this month\nI'm apparently at 75% and only half way through the month, and I have\n**no** idea how that happened.\n\nIt's entirely abusive and invasive that Comcast is `injecting bandwidth\nwarnings into my web\ntraffic `_,\nbut that's also a pretty awful way of attempting to tell a human\nsomething - especially given how much automated traffic my computer\ngenerates. Moreover,\n\nXfinity's site has a `Usage Meter `_\n(which is the source of this data), but it only shows a progress bar for\nthe month - no way to find out usage by day or hour to try and figure\nout what the cause actually was. Also, even if I visit the usage meter\nfrom my own computer *on Xfinity's network*, using the IP address which\nXfinity assigned to me (and is tracking usage for), I still need to log\nin to my account to view the usage. That's a complete pain and seems to\nserve only to prevent customers from keeping track of their usage, not\nto metion preventing guests or friends from checking usage. Hell,\nXfinity used to have a `desktop app to track\nusage `_ but it's been shut down, and a\nhandy `script that used the same API as the desktop\napp `_ no longer works as a\nresult. With all of this put together, I'd say Comcast is going to great\nlengths to maximize overage fees and minimize customers' insight into\ntheir usage.\n\nIn short, I want to be notified of my usage on a regular basis (I get\ndaily emails with the results of this script), and I also want to be\nable to see historical trends (I push the output to Graphite).\n\nDisclaimer\n----------\n\nI have no idea what Xfinity's terms of use for their account management website\nare, or if they claim to have an issue with automating access. They used to have\na desktop app to check usage, backed by an API (see\nhttps://github.com/WTFox/comcastUsage ), but that's been discontinued. The fact\nthat they force me to login with my account credentials WHEN CONNECTING FROM\n*THEIR* NETWORK, USING THE IP ADDRESS *THEY* ISSUED TO MY ACCOUNT just to check\nmy usage, pretty clearly shows me that Comcast cares a lot more about extracting\nthe maximum overage fees from their customers than the \"quality of service\" that\nthey claim these bandwidth limits exist for. So... use this at your own risk,\nbut it seems pretty clear (i.e. discontinuing their \"bandwidth meter\" desktop\napp) that Comcast wants to prevent users from having a clear idea of their\nsupposed bandwidth usage.\n\nLicense\n-------\n\nThis package is licensed under the `GNU AGPLv3 `_.\n\nContributing\n------------\n\nFor information on contributing, see `.github/CONTRIBUTING.md `_.\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/jantman/xfinity-usage",
"keywords": "comcast xfinity usage data meter bandwidth",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "xfinity-usage",
"package_url": "https://pypi.org/project/xfinity-usage/",
"platform": "",
"project_url": "https://pypi.org/project/xfinity-usage/",
"project_urls": {
"Homepage": "https://github.com/jantman/xfinity-usage"
},
"release_url": "https://pypi.org/project/xfinity-usage/3.0.1/",
"requires_dist": [
"selenium"
],
"requires_python": "",
"summary": "Python/selenium script to get Xfinity bandwidth usage from Xfinity MyAccount website.",
"version": "3.0.1"
},
"last_serial": 4399735,
"releases": {
"2.0.0": [
{
"comment_text": "",
"digests": {
"md5": "5da188b5448b7e7b9a3e2cedb1937bcd",
"sha256": "3941452c0623a0e88f48418d59729b5b307ef3f3df59d91898583b91fb8cc020"
},
"downloads": -1,
"filename": "xfinity_usage-2.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5da188b5448b7e7b9a3e2cedb1937bcd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 20486,
"upload_time": "2017-12-18T01:52:38",
"url": "https://files.pythonhosted.org/packages/f6/ac/523d8cc65e1228910ec3cd3240d58d7170dbdf2772c1c2a4ff44fb9a2d51/xfinity_usage-2.0.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d16038600cd51e96d3ba5ab40e4ce733",
"sha256": "21b1dcbbf91232f4e7c2d7eb0fef54814145cb8e05beb3fb5ff9eb75b3ea34eb"
},
"downloads": -1,
"filename": "xfinity-usage-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "d16038600cd51e96d3ba5ab40e4ce733",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27097,
"upload_time": "2017-12-18T01:52:40",
"url": "https://files.pythonhosted.org/packages/68/e0/6543ac1b1c9683a012f4516174aa2b06aadcbe90f23318af83f01e5cdef5/xfinity-usage-2.0.0.tar.gz"
}
],
"2.0.1": [
{
"comment_text": "",
"digests": {
"md5": "b6f91755d80a1d80d48c4b41d06176fc",
"sha256": "d9b14002bf4e1ea2e77b29a1aed8d24c737519e66c89f7ffbb153c9794439582"
},
"downloads": -1,
"filename": "xfinity_usage-2.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "b6f91755d80a1d80d48c4b41d06176fc",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 20788,
"upload_time": "2017-12-18T21:38:32",
"url": "https://files.pythonhosted.org/packages/5f/83/928b29fde48e8f922d6c45f5b885805438444452281604333827894d57f9/xfinity_usage-2.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "c3190397267654dac8dc7953c4ff43ef",
"sha256": "94c89f34565b7a93cdb8f441c8bcb5177876cb48878b4740baa344a967e33221"
},
"downloads": -1,
"filename": "xfinity-usage-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "c3190397267654dac8dc7953c4ff43ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27447,
"upload_time": "2017-12-18T21:38:35",
"url": "https://files.pythonhosted.org/packages/fe/70/cba3c079e6dc57d1e1ca312cc5af8c55131c6c0022f655a2f1c5ac04c4c2/xfinity-usage-2.0.1.tar.gz"
}
],
"2.0.2": [
{
"comment_text": "",
"digests": {
"md5": "df3db626dd58438caf8fc76af1562ba4",
"sha256": "ffa45b966dbb4dc5ea23fabc919cf3a02e24b1aaff7a9d2ccc09f65f65e6faef"
},
"downloads": -1,
"filename": "xfinity_usage-2.0.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "df3db626dd58438caf8fc76af1562ba4",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 20883,
"upload_time": "2018-03-04T13:05:09",
"url": "https://files.pythonhosted.org/packages/9d/4c/72fdc416e8ceddb323bc4f4723b29a66abf72bbc31df18746790ba071425/xfinity_usage-2.0.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "208cb6cf09d1455285977fa217d43b04",
"sha256": "e9d7d795176f19060c61b45a5dcb1bcb52f6f1d0958dc6fa2ae91dbb5c0f3399"
},
"downloads": -1,
"filename": "xfinity-usage-2.0.2.tar.gz",
"has_sig": false,
"md5_digest": "208cb6cf09d1455285977fa217d43b04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27693,
"upload_time": "2018-03-04T13:05:11",
"url": "https://files.pythonhosted.org/packages/dd/9a/9c847a4eb6863735b8240775e7c8666644ec02565b10f7f08770c88b2d96/xfinity-usage-2.0.2.tar.gz"
}
],
"3.0.0": [
{
"comment_text": "",
"digests": {
"md5": "e731599be19b0136124c7bb626bf0c16",
"sha256": "a238b83db84547ab9afa6810f246980e8a6901b90297c901e8d1621dc3f532a3"
},
"downloads": -1,
"filename": "xfinity_usage-3.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e731599be19b0136124c7bb626bf0c16",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 22442,
"upload_time": "2018-04-16T21:40:29",
"url": "https://files.pythonhosted.org/packages/52/38/e6f3e89a83cec284afece4c301d4c2c325c0de476a71c3f95b47871b6e0b/xfinity_usage-3.0.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "37675c22d13ec47a5f3cdaee580a9bb2",
"sha256": "bb119aaad863faa3f3ab96bd774586a8cabd91cfa002485d5a1d99ae6f2a9441"
},
"downloads": -1,
"filename": "xfinity-usage-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "37675c22d13ec47a5f3cdaee580a9bb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29468,
"upload_time": "2018-04-16T21:40:30",
"url": "https://files.pythonhosted.org/packages/d4/f2/730a782ddc54870a21be1823f4ca264ec569ba113d4ffdfd666322df4718/xfinity-usage-3.0.0.tar.gz"
}
],
"3.0.1": [
{
"comment_text": "",
"digests": {
"md5": "fe357e11df61a0b270147619c99e7c96",
"sha256": "f31877cb540d845a8529d4b41a16cc0394bfffa15b8719b960f6af7f9cc67dfa"
},
"downloads": -1,
"filename": "xfinity_usage-3.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe357e11df61a0b270147619c99e7c96",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 18106,
"upload_time": "2018-09-02T12:49:33",
"url": "https://files.pythonhosted.org/packages/17/83/a254ac60b82cdf75a962e5768a8f66205dac15841907ec478ff2860b2429/xfinity_usage-3.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "077da95264b53218114bc9b06ceedabe",
"sha256": "4bdc7c457a4e588b4b607ac00ffe1c9fc614556347911a5ffac00dd3791304f0"
},
"downloads": -1,
"filename": "xfinity-usage-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "077da95264b53218114bc9b06ceedabe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29953,
"upload_time": "2018-09-02T12:49:34",
"url": "https://files.pythonhosted.org/packages/db/25/f910a6fda5966120ea4a34a37817543a3c7b81440a26288a285872bf50cc/xfinity-usage-3.0.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "fe357e11df61a0b270147619c99e7c96",
"sha256": "f31877cb540d845a8529d4b41a16cc0394bfffa15b8719b960f6af7f9cc67dfa"
},
"downloads": -1,
"filename": "xfinity_usage-3.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe357e11df61a0b270147619c99e7c96",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 18106,
"upload_time": "2018-09-02T12:49:33",
"url": "https://files.pythonhosted.org/packages/17/83/a254ac60b82cdf75a962e5768a8f66205dac15841907ec478ff2860b2429/xfinity_usage-3.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "077da95264b53218114bc9b06ceedabe",
"sha256": "4bdc7c457a4e588b4b607ac00ffe1c9fc614556347911a5ffac00dd3791304f0"
},
"downloads": -1,
"filename": "xfinity-usage-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "077da95264b53218114bc9b06ceedabe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29953,
"upload_time": "2018-09-02T12:49:34",
"url": "https://files.pythonhosted.org/packages/db/25/f910a6fda5966120ea4a34a37817543a3c7b81440a26288a285872bf50cc/xfinity-usage-3.0.1.tar.gz"
}
]
}