mechanize
Stateful, programmatic web browsing
Decision gist · record as of 2026-08-14
Yes, if you need lightweight programmatic web interaction without a full browser engine. The low install friction, permissive license, and stable API make it suitable for automation and scraping tasks. However, consider that maintenance is aging—last release was 840 days ago—so evaluate whether the package meets your Python version and modern web compatibility needs before committing to a new project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction; single dependency on html5lib.
- Maintenance status is aging—last release was 840 days ago, though the repository remains active with a recent commit on 2025-05-26 and 759 stars.
License · maintenance · safety
BSD (permissive) — BSD license (permissive); you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-04-26 (840 days) · last repo commit 2025-05-26 · 759 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 364,599 downloads/mo, #7,210 on PyPI
Alternatives
Verify before relying
pip install mechanize
import mechanize
browser = mechanize.Browser()
browser.open('http://example.com')
for link in browser.links():
print(link.text, link.url)- Whether the package works reliably with modern Python versions (requires_python is unspecified in metadata).
- Current state of compatibility with modern web standards and HTML5 parsing edge cases.
- Whether the aging maintenance status signals planned deprecation or stable legacy support.
What it is and what it does
mechanize is a Python library that lets you write code to interact with websites as if you were a browser—opening URLs, filling and submitting forms, following links, and managing browser history. It wraps around html5lib for HTML parsing and provides a stateful interface modeled on urllib2, so you can automate repetitive web tasks without running a full browser. It handles common web conventions automatically: adding the Referer header, respecting robots.txt, and processing HTTP-Equiv and Refresh directives.
The library is useful for web scraping, testing, site monitoring, and automation tasks where you need to interact with forms or navigate between pages programmatically. It's a mature, production-stable tool that has been maintained since 2008, though releases have slowed in recent years.
Use it for
- Scrape data from websites that require form submission and multi-step navigation.
- Automate login flows and session management for testing or monitoring tasks.
- Build link checkers or site crawlers that need to follow and validate page hierarchies.
- Test web applications by simulating user interactions like form filling and submission.
- Monitor websites for changes by fetching and parsing pages programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight programmatic web interaction without a full browser engine.
The low install friction, permissive license, and stable API make it suitable for automation and scraping tasks. However, consider that maintenance is aging—last release was 840 days ago—so evaluate whether the package meets your Python version and modern web compatibility needs before committing to a new project.
Install
mechanize on PyPI
Before you install
Low install friction; single dependency on html5lib. Maintenance status is aging—last release was 840 days ago, though the repository remains active with a recent commit on 2025-05-26 and 759 stars.
License in practice
BSD license (permissive); you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install mechanize
import mechanize
browser = mechanize.Browser()
browser.open('http://example.com')
for link in browser.links():
print(link.text, link.url)
Verify before relying
- Whether the package works reliably with modern Python versions (requires_python is unspecified in metadata).
- Current state of compatibility with modern web standards and HTML5 parsing edge cases.
- Whether the aging maintenance status signals planned deprecation or stable legacy support.
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagehtml5lib |
| Maintenance | Aging 840 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 364,599 / month, #7,210 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonTopic :: InternetTopic :: Internet :: File Transfer Protocol (FTP)Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: BrowsersTopic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Internet :: WWW/HTTP :: Site ManagementTopic :: Internet :: WWW/HTTP :: Site Management :: Link CheckingTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: Traffic GenerationTopic :: System :: Archiving :: MirroringTopic :: System :: Networking :: MonitoringTopic :: System :: Systems AdministrationTopic :: Text ProcessingTopic :: Text Processing :: MarkupTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: XML |
Evidence: mechanize-0.4.10-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “HTTP form filling”
- mechanizeAutomate programmatic interaction with HTTP web servers by simulating…
- MechanicalSoupMechanicalSoup automates interaction with websites by handling HTTP…
- PyPDFFormPyPDFForm creates, inspects, styles, and fills PDF forms via Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also MechanicalSoup · zope.testbrowser · agentql · crawlee · marionette-driver · scrapinghub · Crawl4AI · primp · scrapling · PyPDFForm