A Python package that automates common tasks such as file management, web scraping, and email handling.
You can install the package via pip:
pip install automate-tasks
from automate_tasks.file_management import create_directory, delete_directory, copy_file, move_file
# Example usage
create_directory('new_directory')
delete_directory('new_directory')
copy_file('source.txt', 'destination.txt')
move_file('source.txt', 'new_destination.txt')
from automate_tasks.web_scraping import fetch_html, parse_html
# Example usage
html_content = fetch_html('https://example.com')
parsed_content = parse_html(html_content, 'div', 'class_name')
from automate_tasks.email_handling import send_email
# Example usage
send_email(
sender='[email protected]',
recipient='[email protected]',
subject='Test Email',
body='This is a test email.',
smtp_server='smtp.example.com',
smtp_port=587,
login='[email protected]',
password='password'
)
To run the tests, install the dependencies and run pytest
:
pip install -r requirements.txt
pytest
- Python - Programming language used to develop the package.
- pytest - Testing framework used for unit testing.
- requests - Library for making HTTP requests in web scraping.
- beautifulsoup4 - Library for parsing HTML and XML documents in web scraping.
- secure-smtplib - Library for sending emails securely.
- GitHub Actions - Used for continuous integration (CI) to run tests automatically.
This project is licensed under the MIT License - see the LICENSE file for details.