{"id":20857087,"url":"https://github.com/flipperdevices/flipperzero_protobuf_py","last_synced_at":"2025-04-07T08:17:35.140Z","repository":{"id":39659614,"uuid":"494014678","full_name":"flipperdevices/flipperzero_protobuf_py","owner":"flipperdevices","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-17T13:05:07.000Z","size":208,"stargazers_count":64,"open_issues_count":3,"forks_count":19,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-31T07:06:06.749Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flipperdevices.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-05-19T09:58:19.000Z","updated_at":"2025-03-09T22:59:24.000Z","dependencies_parsed_at":"2024-11-18T04:36:11.504Z","dependency_job_id":"a3fe7bc2-57e2-496f-94f5-5952911a7900","html_url":"https://github.com/flipperdevices/flipperzero_protobuf_py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero_protobuf_py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero_protobuf_py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero_protobuf_py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipperdevices%2Fflipperzero_protobuf_py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flipperdevices","download_url":"https://codeload.github.com/flipperdevices/flipperzero_protobuf_py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615383,"owners_count":20967184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-11-18T04:36:03.666Z","updated_at":"2025-04-07T08:17:35.112Z","avatar_url":"https://github.com/flipperdevices.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python bindings for Flipper Zero protobuf protocol \n\n\nPython API binding/wrappers for Flipper Zero protobuf protocol and command line tool\n\n---\n### flipperCmd ###\n\nThe command tool `flipperCmd` is terminal based tool for file transfer and remote command.\nIt can be run from the command line or as an interactive app.\n\nIt is still a work in progress (Alpha) but is functional. We are looking for help\nwith stabilization of this build, making it work on any system.\n\nIf you want to contribute, we run black and isort for code formatting purposes.\n\n---\n\n\n### Command Line Examples ###\n\nList and manage files from command line\n```\n$ flipperCmd ls\nUsing port /dev/cu.usbmodemflip_Unyana1\n.fseventsd/              .Spotlight-V100/         badusb/                  dolphin/\nibutton/                 infrared/                lfrfid/                  music_player/\nnfc/                     subghz/                  u2f/                     wav_player/\n.metadata_never_index    favorites.txt            Manifest                 rwfiletest.bin\n\n```\n\nCopy single files to fromFlipper device\n```\n$ flipperCmd put My_Home_TV.ir /ext/infrared\nUsing port /dev/cu.usbmodemflip_UOhBaby\nPUT My_Home_TV.ir /ext/infrared\nputting 206 bytes\n\n```\n\nCopy directory tree to Flipper device\n```\n$ flipperCmd put-tree subghz/samples /ext/subghz\n\n```\n\n#### Interactive Command Mode Examples ####\n\n\n```\n$ flipperCmd\nUsing port /dev/cu.usbmodemflip_UOhBaby\nEntering interactive mode\n\n/ext flipper\u003e help\n    CAT                 : read flipper file to screen\n    CD CHDIR            : change current directory on flipper\n    DEV-INFO            : print device info\n    DF INFO             : get Filesystem info\n    DU DISK-USAGE       : display disk usage statistic\n    GET GETFILE         : copy file from flipper\n    GET-TREE GETTREE    : copy directory tree from flipper\n    HELP ?              : print command list\n    HISTORY HIST        : Print command history\n    LCD LCHDIR          : Change local current directory\n    LPWD                : print local working directory\n    LS LIST             : list files and dirs on Flipper device\n    MD MKDIR            : create a new directory\n    MD5SUM MD5          : md5 hash of the file\n    MV RENAME           : rename file or dir\n    PRINT-SCREEN        : Take screendump in ascii or PBM format\n    PUT PUTFILE         : copy file to flipper\n    PUT-TREE PUTTREE    : copy directory tree to flipper\n    QUIT EXIT           : Exit Program\n    REBOOT              : reboot flipper\n    RM DEL DELETE       : delete file of directory on flipper device\n    SEND SEND-COMMAND   : Send non rpc command to flipper\n    SET                 : set or print current option value\n    STAT                : get info about file or dir\n    START-SESSION       : (re) start RPC session\n    STOP-SESSION        : stop RPC session\n    TIME                : Set or Get Current time from Flipper\n    ZIP                 : Generate Zip Archive\n\n```\n\n```\n/ext flipper\u003e ls\n.Spotlight-V100/         .Trashes/                apps/                    badusb/\ndolphin/                 elf/                     ibutton/                 infrared/\nlfrfid/                  music_player/            nfc/                     subghz/\nu2f/                     wav_player/              .metadata_never_index    favorites.txt\nManifest                 rwfiletest.bin\n```\n\n```\n/ext flipper\u003e ls ?\nSyntax :\n\tLS [-l] [-m] \u003cpath\u003e\n    \n/ext flipper\u003e ls -lm\nStorage List result:  /ext\n.Spotlight-V100          \t   DIR\n.Trashes                 \t   DIR\napps                     \t   DIR\nbadusb                   \t   DIR\ndolphin                  \t   DIR\nelf                      \t   DIR\nibutton                  \t   DIR\ninfrared                 \t   DIR\nlfrfid                   \t   DIR\nmusic_player             \t   DIR\nnfc                      \t   DIR\nsubghz                   \t   DIR\nu2f                      \t   DIR\nwav_player               \t   DIR\n.metadata_never_index    \t     0 d41d8cd98f00b204e9800998ecf8427e\nfavorites.txt            \t    93 50c7a56f93d8f6c87f205691def774fa\nManifest                 \t 16871 c74a84dea8d644198d27755313942614\nrwfiletest.bin           \t 16384 3df67097cee5e4cea36e0f941c134ffc\nTotal Bytes: 33348\n\n/ext flipper\u003e rcd infrared/\nremote directory = /ext/infrared \n\n/ext/infrared flipper\u003e ls\nassets/                  IRDB/                    Sanyo/                   TV_Philips/\nMinolta.ir               My_Home_TV.ir\n\n/ext/infrared flipper\u003e quit\nQuit interactive mode\n```\n\n\n---\n\n### API Examples: ###\n```\n#!/usr/bin/env python3\n\nfrom flipperzero_protobuf.cli_helpers import print_hex, dict2datetime\nfrom flipperzero_protobuf.flipper_proto import FlipperProto\n\n\ndef main():\n\n    proto = FlipperProto()\n\n    print(\"\\n\\nPing\")\n    ping_rep = proto.rpc_system_ping()\n    print_hex(ping_rep)\n\n    print(\"\\n\\n]DeviceInfo\")\n    device_info = proto.rpc_device_info()\n    print(device_info)\n\n    print(\"\\n\\nGetDateTime\")\n    dtime_resp = proto.rpc_get_datetime()\n    dt = dict2datetime(dtime_resp)\n    print(dt.ctime())\n\n    print(\"\\n\\nList files\")\n    list_resp = proto.rpc_storage_list('/ext')\n    for li in list_resp:\n        print(f\"[{li['type']}]\\t{li['name']}\")\n\n    # run Infrared App\n    print(\"\\n\\nrun Infrared App\")\n    proto.rpc_app_start('Infrared', '/ext/infrared/Tv_Tivo.ir')\n\n\nif __name__ == '__main__':\n    main()\n\n```\n\n---\n\nSee Also:\u003cbr\u003e\n[flipperdevices/flipperzero-protobuf](http://github.com/flipperdevices/flipperzero-protobuf)\u003cbr\u003e\n[flipperdevices/go-flipper](https://github.com/flipperdevices/go-flipper)\n\nSpecial thanks:\nEvilpete - for making a wrapper and a code cleanup for our internal tool!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipperzero_protobuf_py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipperdevices%2Fflipperzero_protobuf_py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipperdevices%2Fflipperzero_protobuf_py/lists"}