microsoft / microsoft/PowerPlatform-DataverseClient-Python
feat: make pandas an optional dependency
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 60
- Forks
- 23
- Ø Merge
- 13 Std. 53 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
Summary
pandas is a required dependency (pandas>=2.0.0 in pyproject.toml) but is only used by the DataFrame integration (client.dataframe.*, client.records.create(table, dataframe)). The core SDK surface (client.tables.*, client.records.* with dict input, client.query.*) does not import pandas at all.
This makes the SDK unsuitable as a lightweight dependency for services that need only schema manipulation (e.g., table creation, column addition, relationship management) without DataFrame support. pandas adds ~30MB to the installed footprint.
Proposal
Move pandas to an optional extra:
` oml
[project]
dependencies = [
"azure-identity>=1.17.0",
"azure-core>=1.30.2",
"requests>=2.32.0",
]
[project.optional-dependencies]
dataframe = ["pandas>=2.0.0"]
`
Users who need DataFrame integration install pip install powerplatform-dataverse[dataframe]. The core SDK installs with zero heavy dependencies beyond azure-identity and requests.
Motivation
The Cowork (M365 Copilot) runtime is evaluating the SDK as the backend for Dataverse schema operations in the App Builder experience. The runtime already has azure-identity, azure-core, and requests -- but adding pandas (~30MB) as a transitive dependency for unused DataFrame features is a container footprint concern. Making pandas optional would unblock SDK adoption for schema-only use cases.
Backward compatibility
No breaking change: pip install powerplatform-dataverse[dataframe] gives the same behavior as today. Users who import client.dataframe without the extra get an ImportError with a clear message suggesting the extra.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit pyproject.toml und untersuchen Sie die pandas-Referenzen in client.dataframe.* und client.records.create(table, dataframe). Überprüfen Sie, dass die Kerninstallation pandas nicht mehr erfordert, während das dataframe-Extra die bestehende Integration wiederherstellt; das Importieren von client.dataframe ohne das Extra sollte den vorgeschlagenen eindeutigen ImportError auslösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- pandas, python
- Bereich
- backend, build-system
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 72/100