gcp-compute-machines


Namegcp-compute-machines JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/vbutoma/gcp-compute-machines-costs
SummaryA python package for scraping and exporting GCP Compute Machines metadata and costs information.
upload_time2025-01-06 09:09:08
maintainerNone
docs_urlNone
authorVitaly
requires_python<4.0,>=3.12
licenseApache-2.0
keywords gcp google-compute-machines google-compute-machines-costs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GCP Compute Machines Costs

This project is a python package for scraping and exporting GCP Compute Machines metadata and costs information.

# Requirements

* python >= 3.12
* GCP service account with the next assigned permissions:
  * compute.machineTypes.list 
  * compute.regions.list 
  * compute.zones.list

# Installation

```bash
pip install gcp-compute-machines
```

# Usage

Create new file scrape.py with the next content and change `gcp_project_name` and `gcp_sa_account_path` variables.

```python
from gcp_compute_machines import InstanceScraper

gcp_project_name = 'CHANGE_ME'
gcp_sa_account_path = 'CHANGE_ME'


scraper = InstanceScraper(
    gcp_project=gcp_project_name,
    sa_path=gcp_sa_account_path
)
scraper.run(
    # dump=True means that app saves the scrapped SKUs data locally for future reuses.
    dump=True,
    # Set load=True if you want to use local SKUs data between sequential runs.
    load=True
)
scraper.dump_pricing_info(
    raw_pricing_data_file_path='./data/raw_gcp_machines_pricing.yaml',
    flat_pricing_data_file_path='./data/flat_gcp_machines_pricing.yaml'
)
```

# License 

This project is under the [Apache License, Version 2.0](./LICENSE) unless noted otherwise.

# Important info

Please note this project is not an official Google product. 

That means no warranty in costs data integrity. Use scraped data wisely.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vbutoma/gcp-compute-machines-costs",
    "name": "gcp-compute-machines",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "gcp, google-compute-machines, google-compute-machines-costs",
    "author": "Vitaly",
    "author_email": "vit.butoma@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e3/76/cf830507d18bde27482103f276a9f19e8f80a08ddb42324d790a87f0fdbc/gcp_compute_machines-0.0.2.tar.gz",
    "platform": null,
    "description": "# GCP Compute Machines Costs\n\nThis project is a python package for scraping and exporting GCP Compute Machines metadata and costs information.\n\n# Requirements\n\n* python >= 3.12\n* GCP service account with the next assigned permissions:\n  * compute.machineTypes.list \n  * compute.regions.list \n  * compute.zones.list\n\n# Installation\n\n```bash\npip install gcp-compute-machines\n```\n\n# Usage\n\nCreate new file scrape.py with the next content and change `gcp_project_name` and `gcp_sa_account_path` variables.\n\n```python\nfrom gcp_compute_machines import InstanceScraper\n\ngcp_project_name = 'CHANGE_ME'\ngcp_sa_account_path = 'CHANGE_ME'\n\n\nscraper = InstanceScraper(\n    gcp_project=gcp_project_name,\n    sa_path=gcp_sa_account_path\n)\nscraper.run(\n    # dump=True means that app saves the scrapped SKUs data locally for future reuses.\n    dump=True,\n    # Set load=True if you want to use local SKUs data between sequential runs.\n    load=True\n)\nscraper.dump_pricing_info(\n    raw_pricing_data_file_path='./data/raw_gcp_machines_pricing.yaml',\n    flat_pricing_data_file_path='./data/flat_gcp_machines_pricing.yaml'\n)\n```\n\n# License \n\nThis project is under the [Apache License, Version 2.0](./LICENSE) unless noted otherwise.\n\n# Important info\n\nPlease note this project is not an official Google product. \n\nThat means no warranty in costs data integrity. Use scraped data wisely.\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A python package for scraping and exporting GCP Compute Machines metadata and costs information.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/vbutoma/gcp-compute-machines-costs",
        "Repository": "https://github.com/vbutoma/gcp-compute-machines-costs"
    },
    "split_keywords": [
        "gcp",
        " google-compute-machines",
        " google-compute-machines-costs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b2972e4d8f54414c9f3e201a9cae95ee1cf0a4a87d5c58320b7c0e519b89235",
                "md5": "a13933b95f34ffae2adc875956f6b9bd",
                "sha256": "2bb58d2c90d8f01807c49bc0e4e39d78ca432b360f9bbb5d8327d1c9ec5bb08c"
            },
            "downloads": -1,
            "filename": "gcp_compute_machines-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a13933b95f34ffae2adc875956f6b9bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 24962,
            "upload_time": "2025-01-06T09:09:05",
            "upload_time_iso_8601": "2025-01-06T09:09:05.974530Z",
            "url": "https://files.pythonhosted.org/packages/6b/29/72e4d8f54414c9f3e201a9cae95ee1cf0a4a87d5c58320b7c0e519b89235/gcp_compute_machines-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e376cf830507d18bde27482103f276a9f19e8f80a08ddb42324d790a87f0fdbc",
                "md5": "fece984e88a04d153fa3ad53ebbeb94f",
                "sha256": "4205528c365532e33b0a79024fdfe8966ac9618e3a43a4700b0a6678110865ec"
            },
            "downloads": -1,
            "filename": "gcp_compute_machines-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fece984e88a04d153fa3ad53ebbeb94f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 18154,
            "upload_time": "2025-01-06T09:09:08",
            "upload_time_iso_8601": "2025-01-06T09:09:08.578586Z",
            "url": "https://files.pythonhosted.org/packages/e3/76/cf830507d18bde27482103f276a9f19e8f80a08ddb42324d790a87f0fdbc/gcp_compute_machines-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 09:09:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vbutoma",
    "github_project": "gcp-compute-machines-costs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gcp-compute-machines"
}
        
Elapsed time: 0.71130s