{ "info": { "author": "", "author_email": "teebeenator@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# Freebox client library\n\n## Features\n\n* Full API coverage\n* Https and Mdns discovery\n* Thin client wrapper library (<200 lines)\n* Small script to perform most tasks\n\n[![pipeline status](https://framagit.org/sun/pyfbx/badges/master/pipeline.svg)](https://framagit.org/sun/pyfbx/commits/master)\n[![coverage report](https://framagit.org/sun/pyfbx/badges/master/coverage.svg)](https://framagit.org/sun/pyfbx/commits/master)\n\n## Library usage\n\nThe library is available to create your own scripts.\nThe REST API is generated at runtime with the creation of class attributes for all Freebox subsystems.\n\n```python\n>>> from pyfbx import Fbx\n>>> f=Fbx() # By default, this will perform MDNS discovery\n>>> f=Fbx(nomdns=True) # Use faster http api discovery\n>>> f.\nf.Airmedia f.Download_Config f.Lan f.Rrd f.Upnpav\nf.Call f.Download_Feeds f.Lcd f.Share f.Vpn\nf.Connection f.Freeplug f.Nat f.Storage f.Vpn_Client\nf.Contacts f.Fs f.Network_Share f.Switch f.Wifi\nf.Dhcp f.Ftp f.Parental f.System f.mksession(\nf.Download f.Igd f.Pvr f.Upload f.register(\n>>> f.Freeplug.\nf.Freeplug.Get_a_particular_Freeplug_information(\nf.Freeplug.Reset_a_Freeplug(\nf.Freeplug.Get_the_current_Freeplugs_networks(\n\n# Register application to get app token. Physical access is required.\n>>> token = f.register(\"AppId\", \"My App\", \"PC\")\n# Generate session token\n>>> f.mksession(app_id=\"AppId\", token=token)\n\n>>> help(f.Lan.Update_the_current_Lan_configuration)\nHelp on method Update_the_current_Lan_configuration:\n\nUpdate_the_current_Lan_configuration(post_data) method of pyfbx.client.Lan instance\n Update the current Lan configuration\n\n Url parameters:\n Post data:PostData\n\n>>> help(f.Contacts.Access_a_given_contact_entry)\nHelp on method Access_a_given_contact_entry:\n\nAccess_a_given_contact_entry(id) method of pyfbx.client.Contacts instance\n Access a given contact entry\n\n Url parameters: id\n Post data:\n\n>>> f.Lan.Get_the_current_Lan_configuration()\n{'name_dns': 'freebox-server', 'name': 'Freebox Server', 'name_mdns': 'Freebox-Server', \n'mode': 'router', 'name_netbios': 'Freebox_Server', 'ip': '192.168.1.254'}\n\n# Any subsequent call to mksession will refresh the session token\n>>> f.mksession()\n```\n\n## Script\n\nThe included script can perform a lot of tasks.\n\n### Basics\n\n```shell\n$ pyfbx -h\nusage: pyfbx [-h] [-a APP_ID] [-t TOKEN] [-v] [-n] [-j] [-d DELAY] [-u URL]\n [-s SEND] [-c COMMAND]\n\noptional arguments:\n -h, --help show this help message and exit\n -a APP_ID, --app_id APP_ID\n application identifier\n -t TOKEN, --token TOKEN\n token (or f:)\n -v, --verbose increase verbosity to INFO, use twice for DEBUG\n -n, --http disable MDNS and use http known address\n -j, --json json output\n -d DELAY, --delay DELAY\n cylically send command (number of seconds)\n -u URL, --url URL specific url to query\n -s SEND, --send SEND url to send json to\n -c COMMAND, --command COMMAND\n command, defaults to\n System.Get_the_current_system_info()\n```\n\nFirst, register the application:\n\n```shell\n$ pyfbx -a SuperAppId\n```\nOnce registration is done on the device, write down the application token.\nYou can also create a file with token as first line and application Id as second.\n\nUsing this app token, acquire a session token to execute a test command.\n\n```shell\n$ pyfbx -t '' -a SuperAppId\n\n$ cat token.txt\n2OUDy4hhM/KLQ7ru+70gfi83h5A4DUoOpDztOfqM4c2wuUiWJ+gXTHB1SbxHAFP7\nSuperAppId\n\n$ pyfbx -t f:token.txt -c 'Connection.Get_the_current_Connection_status()'\n{ 'bandwidth_down': 1000000000,\n [..]\n 'state': 'up',\n 'type': 'ethernet'}\n```\n\n_Note_ : Don't forget to escape token and command with quotes.\n\n### Advanced\n\nYou can run any commands on the freebox and retrieve complete result or single value\n```shell\n$ pyfbx -t f:/home/foo/token.txt SuperAppId -c 'Contacts.Create_a_contact(\\\npost_data={\"display_name\": \"Sandy Kilo\", \"first_name\": \"Sandy\", \"last_name\":\"Kilo\"})'\n{ 'birthday': '',\n [..]\n 'photo_url': ''}\n\n$ pyfbx -u https://0s2efr3i.fbxos.fr:15628 -c \"Connection.Get_the_current_Connection_status()['rate_up']\" -t f:token.txt\n1700\n```\n\nWith the delay option, commands can be sent cyclically:\n\n```shell\n$ pyfbx -d 1 -c \"Connection.Get_the_current_Connection_status()['rate_up']\" -t f:token.txt\n42460\n50710\n53400\n```\n\nWith the send option, result can be sent to a remote URL.\nIn the following, the result is sent cyclically to example.com in json format.\n\n```shell\npyfbx -j -s http://example.com/values -d 10 -c \"Connection.Get_the_current_Connection_status()\" -t f:token.txt\n```\n\nIt's possible to execute several commands.\nHere, two commands are sent cyclically and results sent to an URL.\n\n```shell\npyfbx -c 'System.Get_the_current_system_info()' -c 'Connection.Get_the_current_Connection_status()' -d 10 -j -s http://localhost:8182/telegraf -t f:token.txt\n```\n\nTelegraf http listener v2 input plugin with json format can be used to plot data in realtime.\n\n### Telegraf and Graphana plots\n\nYou can use a telegraph configuration in /etc/telegraf/telegraf.d/freebox:\n\n```\n[[inputs.http_listener_v2]]\n service_address = \":8182\"\n path = \"/telegraf\"\n methods = [\"POST\"]\n read_timeout = \"10s\"\n write_timeout = \"10s\"\n max_body_size = \"5KB\"\n data_format = \"json\"\n name_override = \"pyfbx\"\n```\n\n![Grafana](https://framagit.org/uploads/-/system/temp/7b198d06e9c27996b60708d470af96ae/debit.png \"Grafana Dashboard\")\n\n## Developpment\n\n### Testing\n\nYou can run tests with\n\n```shell\npip3 install -r requirements-dev.txt\npytest tests\n```\nThe library mechanisms are tested. To get 100% coverage, a Freebox on its default IP (192.168.1.254) is required.\n\nThe API description is generated and thus not functionnaly tested.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://framagit.org/sun/pyfbx", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyfbx", "package_url": "https://pypi.org/project/pyfbx/", "platform": "", "project_url": "https://pypi.org/project/pyfbx/", "project_urls": { "Homepage": "https://framagit.org/sun/pyfbx" }, "release_url": "https://pypi.org/project/pyfbx/0.0.8/", "requires_dist": [ "zeroconf", "requests" ], "requires_python": "", "summary": "Freebox thin client", "version": "0.0.8" }, "last_serial": 5159002, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6460e487f6ce214327e1019f8a577a42", "sha256": "1863e9d26353c7ac6f536047045a0def2b0fffee89ef9ac08e85a2eb538ad85b" }, "downloads": -1, "filename": "pyfbx-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6460e487f6ce214327e1019f8a577a42", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13631, "upload_time": "2019-04-01T19:45:07", "url": "https://files.pythonhosted.org/packages/dd/94/d51d0e854b1d4b6e45c3fcc055cca71103bd09598a54335565eebac94996/pyfbx-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09c467fd9f59294c3979a70ff41e5494", "sha256": "62e0854a4df3c39c3a28c14559f73e13692e4e4dcae3e1c53694e9c67c0df031" }, "downloads": -1, "filename": "pyfbx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "09c467fd9f59294c3979a70ff41e5494", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12517, "upload_time": "2019-04-01T19:45:09", "url": "https://files.pythonhosted.org/packages/7f/72/c9c36f47f5cd87bb2ed51aebc1bff8d01aba8fc16cfc7150919f93759eb6/pyfbx-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "88be4f6465fd434844f7fe8a32db5502", "sha256": "30fc07e3482af76074e48315af23669f15572cc23982b180af40b8cf62d326ac" }, "downloads": -1, "filename": "pyfbx-0.0.3-py3.7.egg", "has_sig": false, "md5_digest": "88be4f6465fd434844f7fe8a32db5502", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 27225, "upload_time": "2019-04-01T22:41:58", "url": "https://files.pythonhosted.org/packages/fb/7d/73a56ce6b71a34230423c650f87a8ce9ccdb063dee97e098e2ef01d84514/pyfbx-0.0.3-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "49900fe6071b3e1e8dd06eed330a5bad", "sha256": "21fbcc1569bee0a76d722fca1ee3dee59009e95b451c940a92d50a337d103d6d" }, "downloads": -1, "filename": "pyfbx-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "49900fe6071b3e1e8dd06eed330a5bad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14128, "upload_time": "2019-04-01T22:42:29", "url": "https://files.pythonhosted.org/packages/4a/84/4a1cab20165ca7c58ee85115be52d00950c99cc734061d81dbcff57db98a/pyfbx-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "012a04e568c68a81417d1360562cd13d", "sha256": "ba155da9502555fd0f5f40feaff1c5466634581b8799de8d6d781cdfc397f216" }, "downloads": -1, "filename": "pyfbx-0.0.3.tar.gz", "has_sig": false, "md5_digest": "012a04e568c68a81417d1360562cd13d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12814, "upload_time": "2019-04-01T22:42:32", "url": "https://files.pythonhosted.org/packages/ff/e5/c701e2bf252cda9ae312a3e23495a788380d1813d58c38260982cf3dd87b/pyfbx-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "aa311215f2dd8d75b26bcf2327550d23", "sha256": "6aae59a0f2b0cdc8cdf25ea19e03b575611b18b9ff73fa7fc6c3704b80934776" }, "downloads": -1, "filename": "pyfbx-0.0.4-py3.7.egg", "has_sig": false, "md5_digest": "aa311215f2dd8d75b26bcf2327550d23", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 40355, "upload_time": "2019-04-15T14:14:51", "url": "https://files.pythonhosted.org/packages/99/7e/15fcc8ad6f6f4c04f770342b4406c3d50aacffe71969bc767fa7a7e7862a/pyfbx-0.0.4-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "fafa7615d13b07eb49684f6645e070aa", "sha256": "6740df893f4af3dfa4ee2091d02da4072dd38c966c13431aa6c1a8d625958c8d" }, "downloads": -1, "filename": "pyfbx-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "fafa7615d13b07eb49684f6645e070aa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16328, "upload_time": "2019-04-04T13:03:55", "url": "https://files.pythonhosted.org/packages/4a/fa/f544cbb8d3166be796234dd562031629d3140de0c753785020814b8188a7/pyfbx-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c907bde31bb733593c00b95f2bbfca03", "sha256": "e4d92a5d86ae804371592a1aba5f9f7ba18c991cd6e02a1f2c433deb68d839c5" }, "downloads": -1, "filename": "pyfbx-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c907bde31bb733593c00b95f2bbfca03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15294, "upload_time": "2019-04-04T13:03:57", "url": "https://files.pythonhosted.org/packages/8c/ff/d79fce0644eff9ba8b42c1d8983bc0906afaae3c3a4c441bd203c99b1f4e/pyfbx-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "140e8fa6fd2ac04ce6d21890ea9c033a", "sha256": "4ff2a5753bdbdd813d4232dc4dd6eae971fbb157744ebf5708817f34e2459649" }, "downloads": -1, "filename": "pyfbx-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "140e8fa6fd2ac04ce6d21890ea9c033a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27275, "upload_time": "2019-04-15T14:14:49", "url": "https://files.pythonhosted.org/packages/ba/bc/8ae808cf6adfcb09f90e35bead72c6b7b71963a1b8c63851bc91616b3344/pyfbx-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f99308039be6f66bc20f8f928049cf23", "sha256": "69834902c378fb265d48d738f56297138913a008209a6a6b0fb2840b26536f35" }, "downloads": -1, "filename": "pyfbx-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f99308039be6f66bc20f8f928049cf23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17730, "upload_time": "2019-04-15T14:15:02", "url": "https://files.pythonhosted.org/packages/66/14/af9cbc97519c77668d518156a67364fdb6809532b86e9da08958d6329170/pyfbx-0.0.5.tar.gz" } ], "0.0.5rc0": [ { "comment_text": "", "digests": { "md5": "a8b807568cefb350f08855a187217913", "sha256": "63f93ab5df735bd0f60852cf92a432a8c9ed8c9b9c2990c0ae9ca82f44afb06e" }, "downloads": -1, "filename": "pyfbx-0.0.5rc0-py3.7.egg", "has_sig": false, "md5_digest": "a8b807568cefb350f08855a187217913", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 67668, "upload_time": "2019-04-15T14:14:53", "url": "https://files.pythonhosted.org/packages/71/d3/fd2e87f5b1eba9dd165539b93344e96fd27b373c933b26ed2318bc31519d/pyfbx-0.0.5rc0-py3.7.egg" } ], "0.0.5rc1": [ { "comment_text": "", "digests": { "md5": "79a8781669308caf9f08529f63032886", "sha256": "081437771a2facf7d5dcb97c46354dfef5cd9ffdc9bf19759a17258c6b06ec93" }, "downloads": -1, "filename": "pyfbx-0.0.5rc1-py3.7.egg", "has_sig": false, "md5_digest": "79a8781669308caf9f08529f63032886", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 67758, "upload_time": "2019-04-15T14:14:58", "url": "https://files.pythonhosted.org/packages/30/71/04c1e4edb7e6710b283c1ee44b9a83997aa78f1b615a93bc7cbd27f60908/pyfbx-0.0.5rc1-py3.7.egg" } ], "0.0.5rc2": [ { "comment_text": "", "digests": { "md5": "848b4291af9c072c0e53f73ce78cecd2", "sha256": "6dde18cdeb26039341e2d53bc174c17f96dd8b9c66c51735682c9e7184936586" }, "downloads": -1, "filename": "pyfbx-0.0.5rc2-py3.7.egg", "has_sig": false, "md5_digest": "848b4291af9c072c0e53f73ce78cecd2", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 67765, "upload_time": "2019-04-15T14:15:00", "url": "https://files.pythonhosted.org/packages/b3/e0/d431efbecaf46dcb7982a2746a52a5b1c5c307f3ae9f824b3f2a785cd617/pyfbx-0.0.5rc2-py3.7.egg" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "49115f7eedcf048f822f1895e8d71c35", "sha256": "1187c03cdcef3f17efc6a7cd39af68d820a0e86393b6a354424b3ce906ba4714" }, "downloads": -1, "filename": "pyfbx-0.0.6-py3.7.egg", "has_sig": false, "md5_digest": "49115f7eedcf048f822f1895e8d71c35", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 60642, "upload_time": "2019-04-16T21:30:48", "url": "https://files.pythonhosted.org/packages/07/12/98ea037461ea12f217242cfd14487866ce0e0ee41472ac4184382e5d5313/pyfbx-0.0.6-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "efd77453c7c8f7585f235402650da69b", "sha256": "44c2fce0b470df51ab2082cb75b784980e467e5b929a4daa279d764d377cdb04" }, "downloads": -1, "filename": "pyfbx-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "efd77453c7c8f7585f235402650da69b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28292, "upload_time": "2019-04-16T21:59:01", "url": "https://files.pythonhosted.org/packages/f4/86/eff6dc85e5bf484cc71788424eb5a4f54c02f3b0ca2633703a48446bc293/pyfbx-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aad9250bcda265dd7239d799871e1a78", "sha256": "db647442daf042c77adee6c39409ef870e9a8cf0642f28ae54f34cd121da839c" }, "downloads": -1, "filename": "pyfbx-0.0.6.tar.gz", "has_sig": false, "md5_digest": "aad9250bcda265dd7239d799871e1a78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19737, "upload_time": "2019-04-16T21:59:04", "url": "https://files.pythonhosted.org/packages/0f/a7/0fea0300ade14d96c92ef07747fc8f7fcd6ed75948b534aac55e30a1bdc6/pyfbx-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "98592d304b42509bff1970bf8770aeed", "sha256": "cffce37e5f0130b73d47564f9e9cdf7236f36de6b85fd6c68ff8af0415399a13" }, "downloads": -1, "filename": "pyfbx-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "98592d304b42509bff1970bf8770aeed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28342, "upload_time": "2019-04-16T21:59:03", "url": "https://files.pythonhosted.org/packages/ce/f2/e5862df9c0754196f551e896899a66b54e9b4c861b0081a5add0831a3aef/pyfbx-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d07bcbabc32ea37513562f316ddd9bc4", "sha256": "dcaa5a67b2c680c0bb79fbb0c4e67b3451862cab1689122dfb18d3bd1d14cae1" }, "downloads": -1, "filename": "pyfbx-0.0.7.tar.gz", "has_sig": false, "md5_digest": "d07bcbabc32ea37513562f316ddd9bc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19850, "upload_time": "2019-04-16T21:59:06", "url": "https://files.pythonhosted.org/packages/22/49/7c36755f6b20b17705577beca178e972f7ab39c215c2346e4b2c291a7025/pyfbx-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "28d0d687d3350321b74b9415b5155fcd", "sha256": "b816390e7cb0ac3c9d261be43646f325fb9597ec125209774932949751f15229" }, "downloads": -1, "filename": "pyfbx-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "28d0d687d3350321b74b9415b5155fcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28496, "upload_time": "2019-04-18T08:51:10", "url": "https://files.pythonhosted.org/packages/77/d4/4bc1c352fdd8bf06157d050fa00410e6c65e84d31e9f5fc022a4ef3708b6/pyfbx-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08a81ccf37a4aae3684c052d57a8be9a", "sha256": "ee7ad7bc70fe0fd49bfea4c1e331614322aacacd1844ef93e0a0392ecfc2b770" }, "downloads": -1, "filename": "pyfbx-0.0.8.tar.gz", "has_sig": false, "md5_digest": "08a81ccf37a4aae3684c052d57a8be9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20207, "upload_time": "2019-04-18T08:51:11", "url": "https://files.pythonhosted.org/packages/8b/d9/a58032cf4e89d7af773216f3aa84e2ea3589b4b8684f2cda5bc551619081/pyfbx-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "28d0d687d3350321b74b9415b5155fcd", "sha256": "b816390e7cb0ac3c9d261be43646f325fb9597ec125209774932949751f15229" }, "downloads": -1, "filename": "pyfbx-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "28d0d687d3350321b74b9415b5155fcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28496, "upload_time": "2019-04-18T08:51:10", "url": "https://files.pythonhosted.org/packages/77/d4/4bc1c352fdd8bf06157d050fa00410e6c65e84d31e9f5fc022a4ef3708b6/pyfbx-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08a81ccf37a4aae3684c052d57a8be9a", "sha256": "ee7ad7bc70fe0fd49bfea4c1e331614322aacacd1844ef93e0a0392ecfc2b770" }, "downloads": -1, "filename": "pyfbx-0.0.8.tar.gz", "has_sig": false, "md5_digest": "08a81ccf37a4aae3684c052d57a8be9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20207, "upload_time": "2019-04-18T08:51:11", "url": "https://files.pythonhosted.org/packages/8b/d9/a58032cf4e89d7af773216f3aa84e2ea3589b4b8684f2cda5bc551619081/pyfbx-0.0.8.tar.gz" } ] }