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
package as interceptor. See the examples below for more
details.
Bearer token authentication
In your server, start it as follows:
import ai4flwr.auth.bearer
fl.server.start_server(
server_address="0.0.0.0:5000",
certificates=(...),
interceptors=[ai4flwr.auth.bearer.BearerTokenInterceptor()]
)
In your client, start it as follows:
import ai4flwr.auth.bearer
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.bearer.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.2.0.tar.gz
(15.4 kB
view details)
Built Distribution
ai4flwr-0.2.0-py3-none-any.whl
(16.2 kB
view details)
File details
Details for the file ai4flwr-0.2.0.tar.gz
.
File metadata
- Download URL: ai4flwr-0.2.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc585d9f488a6991ef3717cbd69b308cd48387c68e1a3c810a5a43606ddbb438 |
|
MD5 | db2ad576a089340f0ff0cf00354f353e |
|
BLAKE2b-256 | d3fb5cd9281d706eb2f25e28f3849be8699fb16b359fcc19a387bd60ccada2b4 |
File details
Details for the file ai4flwr-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ai4flwr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b78dfac0bee8ade2aaf7ed9547fa7027a9ecdd6755da05e48cbccbbf1463730d |
|
MD5 | 00c563842c8c1226fdbcdfbf49d7dbee |
|
BLAKE2b-256 | 518cf080240bc170f13d2e396f3b20c379b2343656d4a43244f926d77c180273 |