Skip to main content

easycloudapi

The easycloudapi is a simple uitility to provide ease of developing experience for any Python Applications.

Functionality Availaible:

  1. Generate Date Dimension
  2. Generate Bigquery Schema from Json

Code Samples:

Generate Bigquery Schema-

  1. You can directly pass json/dict object to the generate_bq_schema method

    from easycloudapi.gcp.bigquery.bigquery_schema import BigquerySchema
    
    sample_json = {
        "name": "Danilo",
        "age": 32,
        "date_joined": "2020-11-05",
        "location": {"country": "United Kingdom", "city": "London"},
        "years_active": [2020, 2021, 2022],
        "favourite_movies": [
            {"name": "Momento", "year": "2000"},
            {"name": "Se7en", "year": "1995"},
            {"name": "Momento", "year": "2000"}
        ]
    }
    
    bq_schema_obj = BigquerySchema()
    out_generate_bq_schema = bq_schema_obj.generate_bq_schema(data=sample_json)
    
    print(f"out_generate_bq_schema:\n{out_generate_bq_schema}")
    
  2. You can also convert the json file into json/dict object and pass to the generate_bq_schema method

    import json
    from easycloudapi.gcp.bigquery.bigquery_schema import BigquerySchema
    
    
    bq_schema_obj = BigquerySchema()
    with open("tests//test_data//sample_json_01.json") as json_file:
        sample_dict = json.load(json_file)
    
    out_generate_bq_schema = bq_schema_obj.generate_bq_schema(data=sample_dict)
    print(out_generate_bq_schema)
    

Date Functionality-

  1. Generate Date Dimension
    from easycloudapi.generic.datetime.generate_date_dimention import generate_date_dimension
    
    out1 = generate_date_dimension(start_date="2023\\08\\01", end_date="2023\\08\\03")
    print(f"out1: {out1}")
    out2 = generate_date_dimension(start_date="2023/08/01", end_date="2023/08/03")
    print(f"out2: {out2}")
    out3 = generate_date_dimension(start_date="2023-08-01", end_date="2023-08-03")
    print(f"out3: {out3}")
    

How to Contribute

  1. Refer to Developer Guide

MIT License

Copyright (c) 2023 easycloudapi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for easycloudapi 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easycloudapi 0.0.3
File Size Uploaded
easycloudapi-0.0.3.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for easycloudapi 0.0.3
File Interpreter ABI Platform
easycloudapi-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / easycloudapi-0.0.3.tar.gz

Download URL easycloudapi-0.0.3.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8978e9689038da5728a8f6802b72b972f5c0fd0c011cbe22354cc28bd50d6689
BLAKE2b-256 checksum
How to use checksums
1862412252433569680280c937cf4ca732803de38acba8925d31418ea0145efd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release files / easycloudapi-0.0.3-py3-none-any.whl

Download URL easycloudapi-0.0.3-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da9d7ace95a8cb6e653b0cb9af24f9879430702ef0e0c175389fb6661d096ec4
BLAKE2b-256 checksum
How to use checksums
997466cd4e170544640baf17214da71b4e5afd96a93be7e112508786a57e270c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page