Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 60 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,74 @@
name: CI
name: ci

on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
id-token: write

jobs:
publish:
build:
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
outputs:
artifact-name: ${{ steps.output.outputs.artifact-name }}
steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.x"

- name: Install build dependencies
run: pip install build

- name: Build package
- name: Install build
run: python -m pip install --upgrade pip build
- name: Build sdist and wheel
run: python -m build
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: dmarcguard-${{ github.run_id }}-${{ github.run_attempt }}
path: dist
- name: Output artifact name
id: output
run: |
echo "artifact-name=dmarcguard-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"

- name: Publish to PyPI
release-please:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
permissions:
contents: write
issues: write
pull-requests: write
steps:
- id: release-please
name: Release please
uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

publish:
if: needs.release-please.outputs.releases_created == 'true'
needs: [release-please, build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/dmarcguard
permissions:
id-token: write
steps:
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: ${{ needs.build.outputs.artifact-name }}
path: dist
- name: Publish to PyPI via Trusted Publishing (OIDC)
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# dmarcguard-sdk-python
# dmarcguard-sdk-python

Official Python SDK for [DMARCguard](https://dmarcguard.io) — DMARC, SPF, and
DKIM monitoring for email deliverability and anti-spoofing.

> [!NOTE]
> This SDK is in early development. The public API is not yet stable.

## Installation

```bash
pip install dmarcguard
```

## Links

- Website: <https://dmarcguard.io>
- Documentation: <https://dmarcguard.io/docs>
- Source: <https://github.com/dmarcguardhq/dmarcguard-sdk-python>
- Issues: <https://github.com/dmarcguardhq/dmarcguard-sdk-python/issues>

## License

Licensed under the [Apache License, Version 2.0](LICENSE).
4 changes: 2 additions & 2 deletions dmarcguard/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Official Python SDK for DMARCGuard."""
"""Official Python SDK for DMARCguard."""

__version__ = "0.0.1"
__version__ = "0.0.1" # x-release-please-version
59 changes: 54 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,68 @@ build-backend = "hatchling.build"
[project]
name = "dmarcguard"
version = "0.0.1"
description = "Official Python SDK for DMARCGuard"
description = "Official Python SDK for DMARCguard — DMARC, SPF, and DKIM monitoring for email deliverability and anti-spoofing."
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.8"
authors = [
{ name = "DMARCGuard", email = "support@dmarcguard.com" },
{ name = "DMARCguard", email = "support@dmarcguard.io" },
]
maintainers = [
{ name = "DMARCguard", email = "support@dmarcguard.io" },
]
keywords = [
"dmarc",
"spf",
"dkim",
"email",
"email-security",
"email-authentication",
"deliverability",
"anti-spoofing",
"anti-phishing",
"dmarcguard",
"sdk",
]
classifiers = [
"Development Status :: 1 - Planning",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications :: Email",
"Topic :: Internet",
"Topic :: Security",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]

[project.urls]
Homepage = "https://github.com/dmarcguardhq/dmarcguard-sdk-python"
Homepage = "https://dmarcguard.io"
Documentation = "https://dmarcguard.io/docs"
Repository = "https://github.com/dmarcguardhq/dmarcguard-sdk-python"
Issues = "https://github.com/dmarcguardhq/dmarcguard-sdk-python/issues"
Changelog = "https://github.com/dmarcguardhq/dmarcguard-sdk-python/blob/main/CHANGELOG.md"

[tool.hatch.build.targets.wheel]
packages = ["dmarcguard"]

[tool.hatch.build.targets.sdist]
include = [
"dmarcguard",
"README.md",
"LICENSE",
"pyproject.toml",
]
24 changes: 24 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"include-component-in-tag": false,
"include-v-in-tag": true,
"pull-request-title-pattern": "chore: release ${version}",
"packages": {
".": {
"package-name": "dmarcguard",
"release-type": "simple",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "toml",
"path": "pyproject.toml",
"jsonpath": "$.project.version"
},
{
"type": "generic",
"path": "dmarcguard/__init__.py"
}
]
}
}
}