AI4OS extensions to the Python Flower federated learning framework (https://flower.dev)
Project description
ai4-flwr
This repository contains the AI4OS extensions for the Flower framework.
Authentication
Authentication for Flower is implemented directly via GRPC: interceptors (server side) and authentication medatata plugins (client side).
In order to use it, the server must be initialized with any object of the
ai4flwr.auth.server
module as interceptor. See the examples below for more
details.
Bearer token authentication
In your server, start it as follows:
import ai4flwr.auth.server
fl.server.start_server(
server_address="0.0.0.0:5000",
certificates=(...),
interceptors=[ai4flwr.auth.server.BearerTokenInterceptor()]
)
In your client, start it as follows:
import ai4flwr.auth.client
token = "Your token as configured in the server"
fl.client.start_numpy_client(
server_address=f"localhost:5000",
client=...,
root_certificates=...
call_credentials=grpc.metadata_call_credentials(
ai4flwr.auth.client.BearerTokenAuthPlugin(token)
),
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai4flwr-0.1.0.tar.gz
(14.2 kB
view details)
Built Distribution
ai4flwr-0.1.0-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file ai4flwr-0.1.0.tar.gz
.
File metadata
- Download URL: ai4flwr-0.1.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.1.0-13-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6858b98154ac1b6e39541c2042ac0bc8eb689f2fc42452b03aadfd667d0363 |
|
MD5 | d1d5449b7e5faeb7748b7380b7c6d928 |
|
BLAKE2b-256 | efe743d64c94b63b2996467b8a486729cc013d70a40919a496a25523df78a810 |
File details
Details for the file ai4flwr-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ai4flwr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.1.0-13-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1895a491a2dd45dc53e088a8283c6c49f7288cca9c9cbc3f66e510ab38bcc26b |
|
MD5 | f613aeafdf9d8cabb5d1a848bcf85026 |
|
BLAKE2b-256 | af3a88ccaf15a949fa3e6441a123ce771873f4958db324731b96ee65885fd20c |