This project contains Python script templates to help structure Python code for data scraping and analysis. It includes examples of web scraping, data processing, and data visualization.
Before you start, make sure you have the following installed:
- Git: Used for version control and to clone the project repository. Download and install from Git - Downloads.
- Python 3.11: The programming language used for this project. Download and install from Python Downloads.
- PyCharm Community Edition: An Integrated Development Environment (IDE) for Python. Download and install from JetBrains: PyCharm. You can upgrade to PyCharm Professional for free with a university email to access more features.
-
Clone the Repository: Open PyCharm, go to
File > New > Project from Version Control
and enter the repository URLhttps://github.com/AdamAdli/py-template
. PyCharm will automatically clone the repository for you. -
Set up a Virtual Environment:
- In PyCharm, navigate to
File > Settings > Project: py-template > Python Interpreter
. - Click on the settings wheel, choose
Add
, and selectVirtual Environment
. - Make sure the
Base interpreter
is set to Python 3.11 and clickOK
. - PyCharm will create and activate a new virtual environment for the project.
- In PyCharm, navigate to
-
Install Dependencies:
- Open the Terminal in PyCharm (usually at the bottom of the IDE).
- Run the following command to install the project's dependencies:
pip install -r requirements.txt
-
Open the Script: In PyCharm, navigate to the
example_wiki_scraper.py
orscript_template.py
file in the Project Explorer. -
Run the Script: Right-click on the open script file and select
Run 'script_template'
to execute the script. You can also use the green play button in the top-right corner. -
View Output: The output will be displayed in the Run window at the bottom of PyCharm.
.idea/
: PyCharm project settings..venv/
: Virtual environment files..gitignore
: Specifies intentionally untracked files to ignore.example_wiki_scraper.py
: An example script for web scraping and data processing.script_template.py
: A template for Python scripting.README.md
: This file, containing project documentation.requirements.txt
: The list of packages required to run the scripts.
Feel free to fork the repository, make changes, and submit pull requests. If you find any issues or have suggestions for improvements, please open an issue in the GitHub repository.
This project is open-sourced under the MIT License.