Skip to main content
logo

ai4-flwr

Conventional Commits GitHub license GitHub release PyPI Python versions

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)
    ),
)

Metadata

Release files for ai4flwr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai4flwr 0.2.0
File Size Uploaded
ai4flwr-0.2.0.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai4flwr 0.2.0
File Interpreter ABI Platform
ai4flwr-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / ai4flwr-0.2.0.tar.gz

Download URL ai4flwr-0.2.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cc585d9f488a6991ef3717cbd69b308cd48387c68e1a3c810a5a43606ddbb438
BLAKE2b-256 checksum
How to use checksums
d3fb5cd9281d706eb2f25e28f3849be8699fb16b359fcc19a387bd60ccada2b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

Release files / ai4flwr-0.2.0-py3-none-any.whl

Download URL ai4flwr-0.2.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b78dfac0bee8ade2aaf7ed9547fa7027a9ecdd6755da05e48cbccbbf1463730d
BLAKE2b-256 checksum
How to use checksums
518cf080240bc170f13d2e396f3b20c379b2343656d4a43244f926d77c180273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page