Skip to main content

A tool to publish Business Central apps to Microsoft AppSource

Project description

BC2AppSource

A Python package for publishing Business Central apps to Microsoft AppSource.

Installation

pip install bc2appsource

Usage

Command Line Interface

# 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

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:

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:

- 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.

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

bc2appsource-0.1.4.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bc2appsource-0.1.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file bc2appsource-0.1.4.tar.gz.

File metadata

  • Download URL: bc2appsource-0.1.4.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bc2appsource-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9a8906484e2af87c41a4636c87817e61992b4aba4162d5b76b872c4c9fb07695
MD5 39d2c06c78595e6746b9f805c102ec23
BLAKE2b-256 f1a407a667648a2038a134fabee4fe308cda36a91d64135ee4d19519a7ab25aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for bc2appsource-0.1.4.tar.gz:

Publisher: publish-to-pypi.yml on attieretief/bc2appsource

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bc2appsource-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: bc2appsource-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bc2appsource-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a0e8f3c58ff9aaa520e87cc5c5d206ad0b953a8fa58f7339991f54cdffa2f802
MD5 1306ea81681dc5f937c4fc1594a4b9f5
BLAKE2b-256 8bea70e78399fdb00bdd913ede8cec983f0de3ffc4eae617b00e03657570e6bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for bc2appsource-0.1.4-py3-none-any.whl:

Publisher: publish-to-pypi.yml on attieretief/bc2appsource

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page