Skip to content

Make beautifulsoup4 an Optional Dependency #1532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lukas-solar
Copy link

Make beautifulsoup4 an Optional Dependency

Summary

This PR moves beautifulsoup4 to an optional dependency, installable via the html extra:

pip install atlassian-python-api[html]

Rationale

  • Limited Usage Scope: beautifulsoup4 is only required for HTML parsing in a small subset of modules. The majority of the package's functionality does not depend on it.
  • Reduces Installation Overhead: By not enforcing installation of unused dependencies, we streamline the installation process for users who don't need HTML parsing.
  • Improves Compatibility: Some environments (e.g., minimal Docker images or serverless functions) may benefit from fewer dependencies, faster builds, and smaller footprints.
  • Design Philosophy: Since HTML parsing can be seen as a less "clean" or ideal approach (often used as a workaround when APIs or structured data aren't available), it's appropriate to isolate this functionality and not impose it on all users by default.

Usage Note

If a user requires HTML-related features, they can explicitly install the optional dependency.
Attempting to use the HTML-parsing functionality without installing beautifulsoup4 will raise an informative ImportError.

@gonchik
Copy link
Member

gonchik commented May 11, 2025

@Lukas-solar Thank you! Indeed that very good step.

Let's try to deploy it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants