marketorestpython
Python Client for the Marketo REST API
What it is and what it does
marketorestpython is a Python wrapper around Marketo's REST API that abstracts away authentication token management, request rate limiting, and error handling. It exposes Marketo's lead, list, activity, and campaign operations through a simple execute() method interface, allowing you to query leads by ID or filter, retrieve program members, create or update leads in bulk, and manage lead program status without manually constructing HTTP requests or managing OAuth tokens.
The library enforces Marketo's standard rate limit of 100 calls per 20 seconds automatically and supports optional per-instance call limits and retry logic for transient failures. It has no external runtime dependencies, making it lightweight to install, though it requires valid Marketo credentials and network connectivity to function. The package is a maintained fork of an earlier stalled project and includes generator-based methods for efficiently paginating large result sets.
Use it for:
- Bulk import or sync lead records from external systems into Marketo by calling create_update_leads with batches of lead objects.
- Query and retrieve lead data by email, ID, or list membership to populate dashboards or feed downstream analytics systems.
- Automate lead status updates across programs (e.g., marking leads as 'Registered' after a webinar) without manual Marketo UI interaction.
- Stream large lead lists from Marketo using generator methods to avoid memory overhead when exporting thousands of records.
- Associate web cookies or tracking tokens with lead records to unify anonymous and known visitor behavior in Marketo.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library that wraps the Marketo REST API, handling authentication, error handling, and rate limiting (100 calls per 20 seconds) to simplify programmatic access to Marketo lead, list, activity, and campaign data.
Yes, with conditions. The package is mature (first released in 2015), permissively licensed, and has no known vulnerabilities. Install friction is high and maintenance is aging (291 days since last release), but the repository is not archived and remains minimally active. Install it if you need straightforward Marketo REST API access in Python and can tolerate a source tarball distribution; avoid it if you require cutting-edge maintenance or guaranteed support for the latest Python versions.
Install
marketorestpython on PyPI
pip
pip install marketorestpythonuv
uv add marketorestpythonpoetry
poetry add marketorestpythonInstalling marketorestpython
Before you install
High install friction reported; no runtime dependencies, but the package itself is distributed as a source tarball. Maintenance status is aging—last release was 291 days ago, though the repository remains active with a recent commit on 2025-10-27 and 140 stars.
License in practice
MIT License (permissive); you may use, modify, and distribute this package freely in commercial and private projects, provided you retain the license notice.
Quickstart
pip install marketorestpython
from marketorestpython.client import MarketoClient
mc = MarketoClient(
munchkin_id="000-AAA-000",
client_id="your_client_id",
client_secret="your_client_secret"
)
lead = mc.execute(method='get_lead_by_id', id=3482141)
Requires valid Marketo credentials (munchkin_id, client_id, client_secret) and network access to Marketo REST API endpoints.
Verify before relying
- Whether the package works with modern Python versions (requires_python is unspecified in metadata).
- Current state of test coverage and whether Travis CI is still actively testing pull requests.
- Whether the high install friction is due to packaging issues or just source distribution format.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 236,518/month — #8,981 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: marketorestpython-0.5.25.tar.gz
Keywords: Marketo, REST API, Wrapper, Client
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
dynamics365crm-pythonProvides a Python client for interacting with…
permissive · top 15,000 on PyPI
salesforce-apiWraps Salesforce's REST and SOAP APIs to…
permissive · top 15,000 on PyPI
simple-salesforceA REST API client for Salesforce that provides…
permissive · top 1,000 on PyPI
python-squareletA Python client library for authenticating with…
permissive · top 15,000 on PyPI
ratelimRatelim enforces rate limits on function calls…
permissive · top 5,000 on PyPI
pinterest-api-sdkPython client library for the Pinterest API…
permissive · top 15,000 on PyPI
rocketchat-APIPython wrapper for the Rocket.Chat REST API,…
permissive · top 15,000 on PyPI
ratelimiterEnforces rate limiting on function calls and…
permissive · top 15,000 on PyPI
apiclientA lightweight framework for building HTTP API…
permissive · top 15,000 on PyPI
ratelimitA function decorator that enforces rate limits…
permissive · top 5,000 on PyPI