Skip to main content

Build Status Published Version Vulnerability Scanning Status

PythonAEM

PythonAEM is a Python client for Adobe Experience Manager (AEM) API. It is written on top of swaggeraem and provides resource-oriented API and convenient response handling.

Learn more about PythonAEM:

pythonaem is part of AEM OpenCloud platform but it can be used as a stand-alone.

Installation

pip3 install pythonaem

Usage

Initialise client:

from pythonaem import PythonAem

conf = {
    'username': 'admin',
    'password': 'admin',
    'protocol': 'http',
    'host': 'localhost',
    'port': 4502,
    'debug': True,
    'verify_ssl': True,
    'ssl_ca_cert': None,
    'cert_file': None,
    'key_file': None
}
client = PythonAem(conf)

Aem:

aem = client.aem()
result = aem.get_aem_health_check({
    'tags': 'shallow',
    'combine_tags_or': 'false',
})

Flush agent:

flush_agent = client.flush_agent('author', 'some-flush-agent')

# create or update flush agent
result = flush_agent.create_update('Some Flush Agent Title', 'Some flush agent description', 'http://somehost:8080')

# check flush agent's existence
result = flush_agent.exists()

# Disable flush agent
result = flush_agent.disable()

# Enable flush agent
result = flush_agent.enable()

# delete flush agent
result = flush_agent.delete()

Replication agent:

replication_agent = client.replication_agent('author', 'some-replication-agent')

# create or update replication agent
result = replication_agent.create_update('Some Replication Agent Title', 'Some Replication agent description', 'http://somehost:8080')

# check replication agent's existence
result = replication_agent.exists()

# Disable replication agent
result = replication_agent.disable()

# Enable replication agent
result = replication_agent.enable()

# delete replication agent
result = replication_agent.delete()

Result

Each of the above method calls returns a Result, which contains message, Response, and data payload. For example:

flush_agent = client.flush_agent('author', 'some-inexisting-flush-agent')
result = flush_agent.delete()
print(result.message)
print(result.response.status_code)
print(result.response.body)
print(result.response.headers)
print(result.data)

Error Handling

flush_agent = client.flush_agent('author', 'some-inexisting-flush-agent')
try:
    result = flush_agent.delete()
except Exception as error:
    self.assertEqual(error.message, 'Flush agent some-inexisting-flush-agent not found on author')

Testing

Integration tests require an AEM instance with Shine Solutions AEM Health Check package installed.

By default it uses AEM running on http://localhost:4502 with admin username and admin password. AEM instance parameters can be configured using environment variables aem_protocol, aem_host, aem_port, aem_username, and aem_password.

Metadata

Release files for pythonaem 1.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythonaem 1.8.1
File Size Uploaded Provenance
pythonaem-1.8.1.tar.gz 14.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pythonaem 1.8.1
File Interpreter ABI Platform
pythonaem-1.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / pythonaem-1.8.1.tar.gz

Download URL pythonaem-1.8.1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
13c0b8071fc7a91f039d6a1cc9d3a7b994844b56172a8559f0ff9e4cd0eac7ac
BLAKE2b-256 checksum
How to use checksums
3173e9ed81b242c9dcfe4233f42fb016550f38e0e2dc122cd9e22e556423087b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.4

Release files / pythonaem-1.8.1-py3-none-any.whl

Download URL pythonaem-1.8.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74ec0791b0037b4f5e7ac5dc243ec32a23fe0f40f4ed00ec445eba04a60f21e4
BLAKE2b-256 checksum
How to use checksums
005f2c3aa0c7576976cd5fe357a3de2b146b56242743b17c486bd287768e9db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.4

Security for pythonaem 1.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page