Skip to content

hossam-elshabory/Google-IDX-Python-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Development Template for Google IDX

Python Version Google IDX Ready

This repository provides a streamlined template for starting your Python development journey within the powerful Google IDX environment. Get up and running quickly with best practices for virtual environments and dependency management baked in.

Table of Contents

What is Google IDX?

Google IDX offers a remarkable browser-based development experience powered by Google Cloud. It provides a fully configured, cloud-hosted environment, allowing you to dive straight into coding web and multiplatform applications without the hassle of local setup. For a comprehensive understanding, explore the official Google IDX guide.

⚠️ Important Note Regarding Extensions:

While the .idx/dev.nix file is configured to automatically download extensions as per the Google IDX documentation, there might be instances where this process doesn't trigger automatically. If you notice missing extensions, please manually install them.

Getting Started

Let's get your Python environment ready within Google IDX!

  1. Open in Google IDX: Click the "Open in Google IDX" button (if available) or clone this repository directly within your Google IDX workspace.
  2. Automatic Environment Setup: IDX will automatically provision your environment with Python 3.11 and pip for 3.11.

Creating and Activating a Virtual Environment

It's a best practice to isolate your project's dependencies within a virtual environment. Here's how:

  1. Open the Terminal: Access the terminal within your Google IDX environment.
  2. Create a Virtual Environment: Execute the following command:
    python -m venv .venv
  3. Activate the Virtual Environment: Run the appropriate command for your shell:
    source .venv/bin/activate
    (You'll typically see (.venv) prepended to your terminal prompt, indicating activation.)

Dependency Management with Poetry (Recommended)

💡 Highly Recommended!

Consider adopting Poetry for robust dependency management and packaging. Poetry simplifies the creation and management of virtual environments and dependencies, leading to more organized, reproducible, and shareable projects.

  1. Install Poetry: If you haven't already, install Poetry within your active virtual environment:

    pip install poetry

    Refer to the comprehensive Poetry documentation for detailed instructions and advanced usage.

  2. Initialize Poetry (if starting a new project): If you don't have a pyproject.toml file yet, run:

    poetry init

    This will guide you through creating your project's pyproject.toml file.

  3. Install Dependencies: To install project dependencies defined in your pyproject.toml file, use:

    poetry install

Need Help?

Don't hesitate to seek assistance and support!

  • IDX Community: Explore the vibrant IDX Community to find existing discussions or post your questions. The community is a great resource for getting help and sharing knowledge.

Customize Your Environment

Tailor your development environment to your preferences by modifying the .idx/dev.nix file. Consult the IDX documentation on customizing environments for detailed instructions and possibilities.

Personalize with Settings & Keybindings

Import your preferred settings and keybindings for a familiar and efficient coding experience:

  • settings.json: Import settings from this GitHub Gist. In your IDX editor, go to File > Preferences > Settings and click on the "Open Settings (JSON)" icon in the top-right corner. Replace the contents with the Gist content.
  • keybindings.json: Import keybindings from this GitHub Gist. In your IDX editor, go to File > Preferences > Keyboard Shortcuts and click on the "Open Keyboard Shortcuts (JSON)" icon in the top-right corner. Replace the contents with the Gist content.

Contributing

Contributions to improve this template are welcome! Feel free to submit pull requests with suggestions or improvements.

Happy coding in Google IDX!

About

A Template Repo for Google IDX IDE for Python Development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages