# BC2AppSource
A Python package for publishing Business Central apps to Microsoft AppSource.
## Installation
```bash
pip install bc2appsource
```
## Usage
### Command Line Interface
```bash
# Publish an app to AppSource
bc2appsource publish \
--app-file path/to/your/app.app \
--tenant-id your-tenant-id \
--client-id your-client-id \
--client-secret your-client-secret \
--product-name "Your Product Name"
# With library app file
bc2appsource publish \
--app-file path/to/your/app.app \
--library-app-file path/to/library.app \
--tenant-id your-tenant-id \
--client-id your-client-id \
--client-secret your-client-secret \
--product-name "Your Product Name"
```
### Python API
```python
from bc2appsource import AppSourcePublisher
publisher = AppSourcePublisher(
tenant_id="your-tenant-id",
client_id="your-client-id",
client_secret="your-client-secret"
)
# Publish app
result = publisher.publish(
app_file="path/to/your/app.app",
product_name="Your Product Name",
library_app_file="path/to/library.app", # Optional
auto_promote=True
)
if result.success:
print(f"Submission ID: {result.submission_id}")
else:
print(f"Error: {result.error}")
```
## Authentication
You need to register an Azure AD application with the following permissions:
- Microsoft Partner Center API access
- Application permissions for submitting to AppSource
## Environment Variables
You can also use environment variables instead of passing credentials:
```bash
export AZURE_TENANT_ID=your-tenant-id
export AZURE_CLIENT_ID=your-client-id
export AZURE_CLIENT_SECRET=your-client-secret
```
## GitHub Actions
This package can be used in GitHub Actions workflows:
```yaml
- name: Install bc2appsource
run: pip install bc2appsource
- name: Publish to AppSource
run: |
bc2appsource publish \
--app-file artifacts/*.app \
--product-name "${{ github.event.repository.name }}"
env:
AZURE_TENANT_ID: ${{ secrets.APPSOURCE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.APPSOURCE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.APPSOURCE_CLIENT_SECRET }}
```
## License
MIT License - see LICENSE file for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "bc2appsource",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "business-central, appsource, microsoft, dynamics365, business-central-apps, publishing, automation",
"author": null,
"author_email": "Attie Retief <attie@example.com>",
"download_url": "https://files.pythonhosted.org/packages/64/ed/2b7025aa0be52c140b9df73afee3384aeaaec2403fff25cd7303b455b6db/bc2appsource-0.1.8.tar.gz",
"platform": null,
"description": "# BC2AppSource\n\nA Python package for publishing Business Central apps to Microsoft AppSource.\n\n## Installation\n\n```bash\npip install bc2appsource\n```\n\n## Usage\n\n### Command Line Interface\n\n```bash\n# Publish an app to AppSource\nbc2appsource publish \\\n --app-file path/to/your/app.app \\\n --tenant-id your-tenant-id \\\n --client-id your-client-id \\\n --client-secret your-client-secret \\\n --product-name \"Your Product Name\"\n\n# With library app file\nbc2appsource publish \\\n --app-file path/to/your/app.app \\\n --library-app-file path/to/library.app \\\n --tenant-id your-tenant-id \\\n --client-id your-client-id \\\n --client-secret your-client-secret \\\n --product-name \"Your Product Name\"\n```\n\n### Python API\n\n```python\nfrom bc2appsource import AppSourcePublisher\n\npublisher = AppSourcePublisher(\n tenant_id=\"your-tenant-id\",\n client_id=\"your-client-id\",\n client_secret=\"your-client-secret\"\n)\n\n# Publish app\nresult = publisher.publish(\n app_file=\"path/to/your/app.app\",\n product_name=\"Your Product Name\",\n library_app_file=\"path/to/library.app\", # Optional\n auto_promote=True\n)\n\nif result.success:\n print(f\"Submission ID: {result.submission_id}\")\nelse:\n print(f\"Error: {result.error}\")\n```\n\n## Authentication\n\nYou need to register an Azure AD application with the following permissions:\n- Microsoft Partner Center API access\n- Application permissions for submitting to AppSource\n\n## Environment Variables\n\nYou can also use environment variables instead of passing credentials:\n\n```bash\nexport AZURE_TENANT_ID=your-tenant-id\nexport AZURE_CLIENT_ID=your-client-id\nexport AZURE_CLIENT_SECRET=your-client-secret\n```\n\n## GitHub Actions\n\nThis package can be used in GitHub Actions workflows:\n\n```yaml\n- name: Install bc2appsource\n run: pip install bc2appsource\n\n- name: Publish to AppSource\n run: |\n bc2appsource publish \\\n --app-file artifacts/*.app \\\n --product-name \"${{ github.event.repository.name }}\"\n env:\n AZURE_TENANT_ID: ${{ secrets.APPSOURCE_TENANT_ID }}\n AZURE_CLIENT_ID: ${{ secrets.APPSOURCE_CLIENT_ID }}\n AZURE_CLIENT_SECRET: ${{ secrets.APPSOURCE_CLIENT_SECRET }}\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A tool to publish Business Central apps to Microsoft AppSource",
"version": "0.1.8",
"project_urls": {
"Bug Tracker": "https://github.com/attieretief/bc2appsource/issues",
"Documentation": "https://github.com/attieretief/bc2appsource#readme",
"Homepage": "https://github.com/attieretief/bc2appsource",
"Source Code": "https://github.com/attieretief/bc2appsource"
},
"split_keywords": [
"business-central",
" appsource",
" microsoft",
" dynamics365",
" business-central-apps",
" publishing",
" automation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "747fec23c2ce0efbdacc712620308b3cc46d8b68c7e451225f42140c3c29e7c3",
"md5": "dbe72732d7bf2374ae2a1638015fccc8",
"sha256": "670fca2880a0d34cf4dca122777c0c75bfab1108b83422aa904e40bb97d54b28"
},
"downloads": -1,
"filename": "bc2appsource-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dbe72732d7bf2374ae2a1638015fccc8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9850,
"upload_time": "2025-07-29T14:43:17",
"upload_time_iso_8601": "2025-07-29T14:43:17.225152Z",
"url": "https://files.pythonhosted.org/packages/74/7f/ec23c2ce0efbdacc712620308b3cc46d8b68c7e451225f42140c3c29e7c3/bc2appsource-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "64ed2b7025aa0be52c140b9df73afee3384aeaaec2403fff25cd7303b455b6db",
"md5": "5d0e101e414c86acf70116c703646f20",
"sha256": "46114a11764041a4a0e077d2172a87375f4b3aa9f4a5f88bce3d9f8b98807fa4"
},
"downloads": -1,
"filename": "bc2appsource-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "5d0e101e414c86acf70116c703646f20",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12500,
"upload_time": "2025-07-29T14:43:18",
"upload_time_iso_8601": "2025-07-29T14:43:18.267414Z",
"url": "https://files.pythonhosted.org/packages/64/ed/2b7025aa0be52c140b9df73afee3384aeaaec2403fff25cd7303b455b6db/bc2appsource-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-29 14:43:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "attieretief",
"github_project": "bc2appsource",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.31.0"
]
]
},
{
"name": "click",
"specs": [
[
">=",
"8.0.0"
]
]
}
],
"lcname": "bc2appsource"
}