Skip to main content

PyFabricConnect

Unified Python connectivity toolkit for Microsoft Fabric Warehouses, Lakehouses, and SQL Analytics Endpoints.

PyFabricConnect simplifies secure connectivity to Microsoft Fabric using modern authentication methods and multiple connector backends including JDBC, ODBC, and SQLAlchemy.


Features

  • JDBC connectivity for Spark workloads
  • ODBC connectivity using pyodbc
  • SQLAlchemy integration
  • Service Principal authentication
  • OAuth Access Token authentication
  • Pandas DataFrame support
  • Spark DataFrame support
  • Unified authentication abstraction
  • Enterprise-ready architecture

Supported Technologies

Technology Supported
Microsoft Fabric Warehouse
Lakehouse SQL Endpoint
Spark JDBC
pyodbc
SQLAlchemy
Pandas
PySpark

Installation

Base Installation

pip install pyfabricconnect

Spark Support

Microsoft Fabric environments already include PySpark and an active Spark runtime.

For local Spark environments, install Spark support with:

pip install pyfabricconnect[spark]

Development Environment

pip install pyfabricconnect[dev]

Quick Start

Service Principal Authentication

from pyfabricconnect import FabricClient
from pyfabricconnect.auth import ServicePrincipalAuth

auth = ServicePrincipalAuth(
    tenant_id="YOUR_TENANT_ID",
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET"
)

client = FabricClient(
    server="YOUR_SERVER",
    database="WH_PYFABRICCONNECT",
    auth=auth
)

df = client.query_pandas("""
SELECT * FROM dbo.qlbacan
""")

print(df.head())

Spark Example

The query_spark() method requires an active SparkSession.

from pyspark.sql import SparkSession

from pyfabricconnect import FabricClient
from pyfabricconnect.auth import ServicePrincipalAuth

spark = SparkSession.builder.getOrCreate()

auth = ServicePrincipalAuth(
    tenant_id="YOUR_TENANT_ID",
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET"
)

client = FabricClient(
    server="YOUR_SERVER",
    database="WH_PYFABRICCONNECT",
    auth=auth,
    spark=spark
)

spark_df = client.query_spark("""
SELECT * FROM dbo.qlbacan
""")

spark_df.show()

SQLAlchemy Example

engine = client.engine()

Supported Environments

PyFabricConnect is designed to work with:

  • Microsoft Fabric Notebooks
  • Azure Synapse Analytics
  • Databricks
  • Local PySpark environments
  • Python applications
  • Data engineering pipelines

Project Structure

pyfabricconnect/
│
├── pyfabricconnect/
│   ├── auth/
│   ├── connectors/
│   ├── core/
│   └── utils/
│
├── tests/
├── examples/
├── README.md
├── LICENSE
├── pyproject.toml
└── .gitignore

Project Status

PyFabricConnect is currently under active development.


Roadmap

v0.1.0

  • JDBC Connector
  • ODBC Connector
  • SQLAlchemy Connector
  • Service Principal Authentication
  • OAuth Token Authentication

Future Releases

  • Managed Identity
  • Token Refresh
  • Retry Policies
  • Structured Logging
  • Async Support
  • Connection Pooling

Contributing

Contributions, issues, and feature requests are welcome.


Support the Project

If PyFabricConnect helps your projects or organization, consider supporting development.

Your support helps maintain:

  • Fabric integrations
  • Authentication improvements
  • New connectors
  • Documentation
  • Community support

Donations


License

Apache License 2.0

Copyright 2026 Eduardo Osorio Venegas - EOSOVNGAS

Release files for pyfabricconnect 0.1.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 pyfabricconnect 0.1.0
File Size Uploaded
pyfabricconnect-0.1.0.tar.gz 13.2 kB Details

Built distribution (wheel)

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

Total release size: 29.9 kB

Release files / pyfabricconnect-0.1.0.tar.gz

Download URL pyfabricconnect-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
532096251e750e95b7eb67cd2a10308e3286a7cba7f5fb8864c1bbf282588217
BLAKE2b-256 checksum
How to use checksums
f3ccfd2406f1c6383cd0b274e0096f8decc1012086713f3b75b2dd539be45c28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / pyfabricconnect-0.1.0-py3-none-any.whl

Download URL pyfabricconnect-0.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f701c9d3d1544e706e445c1bc145cde86cc1a51b3fbbd667a0e81c5c2fa5c78
BLAKE2b-256 checksum
How to use checksums
1eccf23674bfee3ba402558632fb59df487e9c528aa49a3177baf7c2ae7a17af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

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