SSRS Library
Project description
SSRS Python Tools
A modern Python library to replace the PowerShell ReportingServicesTools module, designed for automation and CI/CD pipelines (e.g., GitLab CI/CD).
Repository: ipierre1/ssrs-powerbi-library
PyPI package: ssrs-powerbi-library
🚀 Features
- Full replacement for PowerShell ReportingServicesTools
- Native REST API for SQL Server Reporting Services (SSRS)
- NTLM authentication support (Windows credentials)
- CI/CD integration (GitLab, GitHub, Azure, etc.)
- Data source connection testing
- Report and catalog item management
- Flexible configuration via environment variables
- Advanced logging for debugging and monitoring
📦 Installation
# Install from PyPI (recommended)
pip install ssrs-powerbi-library
# Or install from source
git clone https://github.com/ipierre1/ssrs-powerbi-library.git
cd ssrs-powerbi-library
pip install -r requirements.txt
pip install -e .
Requirements
- Python 3.7+
- Access to an SSRS server with REST API enabled
- Credentials for NTLM authentication
📚 End-User API
Main Classes & Functions
| Name | Type | Description |
|---|---|---|
SSRSRestClient |
Class | Main client for SSRS REST API |
• get_catalog_item |
Method | Get info for a catalog item |
• get_catalog_items |
Method | List catalog items in a folder |
• test_connection |
Method | Test connection to SSRS server |
SSRSDataSourceManager |
Class | Data source management (test, set, list, etc.) |
• get_item_data_sources |
Method | List data sources for a catalog item |
• test_item_data_source_connection |
Method | Test all or one data source connection for a catalog item |
• test_data_source_connection |
Method | Test a specific data source connection |
• set_item_data_source |
Method | Set/update data sources for a catalog item |
SSRSSecurityManager |
Class | Security/permissions management |
• get_item_permissions |
Method | Get permissions for a catalog item |
• set_item_permissions |
Method | Set permissions for a catalog item |
• get_roles |
Method | List available roles |
• add_group_or_user |
Method | Add a group or user to an item |
• remove_group_or_user |
Method | Remove a group or user from an item |
• list_users_and_groups |
Method | List users and groups with access |
create_credentials_by_user |
Function | Helper to create CredentialsByUser |
create_credentials_in_server |
Function | Helper to create CredentialsInServer |
create_no_credentials |
Function | Helper to create NoCredentials |
Types, Enums & Dataclasses
| Name | Type | Description |
|---|---|---|
RsItem |
Dataclass | Represents a catalog item (report, folder, etc.) |
RsDataSource |
Dataclass | Represents a data source |
RsItemType |
Enum | Catalog item types (Report, Folder, etc.) |
DataSourceType |
Enum | Data source types (SQL, OLEDB, etc.) |
RsCredentials |
Dataclass | Base class for credentials |
CredentialsByUser |
Dataclass | User/password credentials |
CredentialsInServer |
Dataclass | Credentials stored in server |
NoCredentials |
Dataclass | No credentials |
🔧 Configuration
Environment Variables (for CI/CD)
Set these variables in your CI/CD environment:
SSRS_SERVER_URL=http://your-ssrs-server/reports
SSRS_USERNAME=your-username
SSRS_PASSWORD=your-password
SSRS_DOMAIN=your-domain # Optional
Python Usage Example
from ssrs_library.ssrs_library import SSRSRestClient
client = SSRSRestClient(
server_url='http://your-server/reports',
username='your-username',
password='your-password',
domain='your-domain' # optional
)
# Example: List catalog items in root folder
items = client.get_catalog_items('/')
for item in items:
print(item.name, item.item_type)
🧪 Testing
pytest tests/
📄 License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssrs_powerbi_library-1.2.0.tar.gz.
File metadata
- Download URL: ssrs_powerbi_library-1.2.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f19c7f5d824fb4af7badf4521bc39540ca900e5eb5fca743bc187190bcde90a6
|
|
| MD5 |
d5e1a30c4748fdd84944907190aa620a
|
|
| BLAKE2b-256 |
de1f623e9745c7c1405e3c2d9c731ebc79f61b5431750368540967a783288568
|
Provenance
The following attestation bundles were made for ssrs_powerbi_library-1.2.0.tar.gz:
Publisher:
release.yml on ipierre1/ssrs-powerbi-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssrs_powerbi_library-1.2.0.tar.gz -
Subject digest:
f19c7f5d824fb4af7badf4521bc39540ca900e5eb5fca743bc187190bcde90a6 - Sigstore transparency entry: 336218016
- Sigstore integration time:
-
Permalink:
ipierre1/ssrs-powerbi-library@3c34216181b3397e6b3708da4c999259d4f02bf7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ipierre1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c34216181b3397e6b3708da4c999259d4f02bf7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ssrs_powerbi_library-1.2.0-py3-none-any.whl.
File metadata
- Download URL: ssrs_powerbi_library-1.2.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a04ce3d56dcef29ccfe2e60346b60e760c0a87826fae150066a6db8aef12a0e6
|
|
| MD5 |
c9868ad238b43b95beaa6bfd80c5bcc2
|
|
| BLAKE2b-256 |
fb6e6e98d6e04fbca3be5e9133d352728ce8cbbc184264dbe48fc1b556496bb6
|
Provenance
The following attestation bundles were made for ssrs_powerbi_library-1.2.0-py3-none-any.whl:
Publisher:
release.yml on ipierre1/ssrs-powerbi-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssrs_powerbi_library-1.2.0-py3-none-any.whl -
Subject digest:
a04ce3d56dcef29ccfe2e60346b60e760c0a87826fae150066a6db8aef12a0e6 - Sigstore transparency entry: 336218037
- Sigstore integration time:
-
Permalink:
ipierre1/ssrs-powerbi-library@3c34216181b3397e6b3708da4c999259d4f02bf7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ipierre1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c34216181b3397e6b3708da4c999259d4f02bf7 -
Trigger Event:
push
-
Statement type: