跳转到主要内容

提供异步认证和对Freebox服务器的访问

项目描述

PyPI GitHub Release Python Version License

Read the documentation at https://freebox-api.readthedocs.io/ Tests Codecov GitHub Activity

pre-commit Black

特性

使用Freebox OS API在Python中轻松管理您的freebox。检查您的电话,管理您的联系人,配置您的dhcp,禁用您的wifi,监控您的LAN活动等等,在LAN或远程。

freebox-api是一个实现freebox OS API的Python库。它处理认证过程,并以异步方式提供对freebox API的原始访问。

此项目基于fstercq/freepybox,它以同步方式提供与freebox-api相同的特性。

要求

  • 待办事项

安装

您可以通过pipPyPI安装freebox-api

$ pip install freebox-api

或从github手动下载最新版本,并使用Poetry安装

$ git clone https://github.com/hacf-fr/freebox-api.git
$ python poetry install

用法

# Import the freebox-api package.
from freebox_api import Freepybox

async def reboot()
   # Instantiate the Freepybox class using default options.
   fbx = Freepybox()

   # Connect to the freebox with default options.
   # Be ready to authorize the application on the Freebox.
   await fbx.open('192.168.0.254')

   # Do something useful, rebooting your freebox for example.
   await fbx.system.reboot()

   # Properly close the session.
   await fbx.close()

请查看example.py以获取更全面的概述。

HTTPS说明

当您通过默认分配的域名(以 fbxos.fr 结尾)访问 Freebox 时,库会通过自动信任 Freebox 认证机构来验证其证书。如果您想避免这种情况,您可以为 设置一个自定义域名,该域名将关联到 Let’s Encrypt 证书。

资源

Freebox OS API 文档: http://dev.freebox.fr/sdk/os/

贡献

欢迎贡献力量。了解更多信息,请参阅 贡献指南

许可证

在 GNU GPL v3 许可证下分发,freebox-api 是免费且开源的软件。

问题

如果您遇到任何问题,请详细描述并 提交问题

鸣谢

该项目是从 @cjolowiczHypermodern Python Cookiecutter 模板 生成的。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

freebox_api-1.1.0.tar.gz (37.3 kB 查看哈希)

上传时间 源代码

构建分发

freebox_api-1.1.0-py3-none-any.whl (43.1 kB 查看哈希)

上传时间 Python 3

由以下机构支持