Skip to main content

A SweetConnect API library for Python

Project description

SweetConnect API Library

Status License Python Version pre-commit Black

Features

  • TODO

Requirements

  • TODO

Installation

You can install SweetConnect API Library via pip from PyPI:

$ pip install sweetconnect-api

Development

This project uses uv for dependency management. To set up a development environment:

# Install uv (if not already installed)
$ curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
$ git clone https://gitlab.com/sweetconnect/public/sweetconnect-api
$ cd sweetconnect-api

# Install dependencies
$ uv sync

# Run tests
$ uv run pytest

# Run all checks with nox
$ uv tool run nox

# Run linting with ruff
$ uv run ruff check .
$ uv run ruff format .

Code Quality Notes

Linting: This project uses Ruff for linting and formatting.

Pre-commit Hooks: This project uses pre-commit hooks to ensure code quality before commits.

To set up pre-commit hooks:

# Install pre-commit hooks (one-time setup)
$ uv run pre-commit install

# Run hooks manually on all files
$ uv run pre-commit run --all-files

# Run hooks on staged files only (happens automatically on commit)
$ git commit

The pre-commit hooks will automatically check:

  • Ruff: Code linting and formatting
  • File checks: Large files, TOML/YAML syntax, trailing whitespace
  • Secret detection: Prevents committing passwords, API keys, and private keys
  • Prettier: Formats JSON/YAML/Markdown files

Known Issues to Address:

  • API models use mixedCase naming (e.g., assetId, tenantId) following the REST API convention
  • Some examples use star imports (from module import *)
  • A few bare except clauses need specific exception handling
  • Missing docstrings in some public APIs

These naming conventions are intentional to match the SweetConnect API design and will be preserved. Other issues will be addressed in future updates.

Versioning

This project uses hatch-vcs for automatic version management based on Git tags:

  • Release versions (e.g., 0.1.0): Created from Git tags (e.g., v0.1.0)
  • Development versions (e.g., 0.1.1.dev0+g5712c2b): Automatically generated between releases

To create a new release:

# Create and push a version tag
$ git tag v0.2.0
$ git push origin v0.2.0

The version is automatically determined from Git history - no manual version updates needed in pyproject.toml.

Continuous Integration

This project uses Bitbucket Pipelines for CI/CD. The pipeline runs:

  • Linting: Ruff checks code style and quality
  • Type Checking: mypy is currently disabled due to too many type errors that need to be addressed
  • Security: Safety checks are currently disabled
  • Build: Creates distribution packages
  • Deployments:
    • dev: Automatically deploys to PyPI from the main branch (development versions)
    • production: Automatically deploys to PyPI when a v* tag is pushed (release versions)

Setup Requirements:

To enable PyPI publishing, add the PYPI_TOKEN secret in Bitbucket:

  1. Go to Repository Settings → Pipelines → Repository variables
  2. Add variable: PYPI_TOKEN with your PyPI API token

Usage

Please see the Command-line Reference for details. The documentation for the api-endpoints is available here:

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template. For more details see Hypermodern Python documentation

License

Distributed under the terms of the GPL 3.0 license, SweetConnect API Library is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

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

sweetconnect_api-0.1.1.dev312.tar.gz (851.5 kB view details)

Uploaded Source

Built Distribution

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

sweetconnect_api-0.1.1.dev312-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file sweetconnect_api-0.1.1.dev312.tar.gz.

File metadata

  • Download URL: sweetconnect_api-0.1.1.dev312.tar.gz
  • Upload date:
  • Size: 851.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sweetconnect_api-0.1.1.dev312.tar.gz
Algorithm Hash digest
SHA256 1c973565ab15e9f4d191acdf10b791814a0af5f86deeb8734223c5d31b2dbdf7
MD5 99e847692b5b53a7e8ab55e1f20f2485
BLAKE2b-256 892006c441aab72e74d5ce10ad47385beea92976d74b283f1698488a76cfb361

See more details on using hashes here.

File details

Details for the file sweetconnect_api-0.1.1.dev312-py3-none-any.whl.

File metadata

  • Download URL: sweetconnect_api-0.1.1.dev312-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sweetconnect_api-0.1.1.dev312-py3-none-any.whl
Algorithm Hash digest
SHA256 e3cf9d4e028e966f47ef5a7f3568c0274146efc992e229f4d3142aea61c5961b
MD5 9bdec179b8656080bb31b082ad45cad6
BLAKE2b-256 ade56169bcd4e1ad2897b9070e1d106c61818bd60f83291bd7aa7896f2928dcf

See more details on using hashes here.

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