Saravanan666/pypi-org huggingface dataset:
Package: cloud-storage-mocker
cloud-storage-mockerMocker library ofGoogle Cloud Storage Python clientwith local filesystem mounting.InstallFor package users:pipinstallcloud-storage-mockerFor package developers:gitclonegit@github.com:odashi/cloud-storage-mockercdcloud-storage-mocker
python-mvenvvenvsourcevenv/bin/activate
pipinstall-e'.[dev]'How the package worksBasic usageThis library providespatchcontext manager, which replaces following classes on thegoogle-cloud-storagepackage:ClientBucketBlobpatchtakes a list ofMountobjects, which represent mappings between bucket names
and directories on the local filesystem.
EachMounthas Boolean configsreadableandwritableto control read/write
permissions to the mounted buckets.A canonical use-case of this package is writing unit tests to check the behavior of the
code that works with Google Cloud Storage:importpathlibimportgoogle.cloud.storage# type: ignore[import]fromcloud_storage_mockerimportBlobMetadata,Mountfromcloud_storage_mockerimportpatchasgcs_patchdeftest_something(tmp_path:pathlib.Path)->None:# Creates two temporary directories for readable/writable buckets.src_dir=tmp_path/"src"dest_dir=tmp_path/"dest"src_dir.mkdir()dest_dir.mkdir()# A sample file on the readable bucket.(src_dir/"hello.txt").write_text("Hello.")# Optionally, object metadata can also be specified by the file beside the# content, suffixed by ".__metadata__".(src_dir/"hello.txt.__metadata__").write_text(BlobMetadata(content_type="text/plain").dump_json())# Mounts directories. Empty list is allowed if no actual access is required.withgcs_patch([Mount("readable",src_dir,readable=True),Mount("writable",dest_dir,writable=True),],):client=google.cloud.storage.Client()# Reads a blob.blob=client.bucket("readable").blob("hello.txt")assertblob.download_as_text()=="Hello."# Metadata is available after downloading the content.assertblob.content_type=="text/plain"# Writes a blob.blob=client.bucket("writable").blob("world.txt")blob.upload_from_string("World.")# Checks if the file is written appropriately.assert(dest_dir/"world.txt").read_text()=="World."Patched methods/propertiesMethods listed below have specialized behavior to mount the local filesystem.Other methods are mapped toMagicMock.Client()

Client.bucket()

Bucket()

Bucket.blob()

Blob()

# Blob properties (download only)
Blob.cache_control
Blob.content_disposition
Blob.content_encoding
Blob.content_language
Blob.content_type

Blob.download_to_file()
Blob.download_to_filename()
Blob.download_as_bytes()
Blob.download_as_string()
Blob.download_as_text()
Blob.upload_from_file()
Blob.upload_from_filename()
Blob.upload_from_string()CautionThis library is basically provided for writing unit tests.
DO NOT use this library on any code on the production.
Package: cloud-storage-slim
Cloud Storage SlimPrinciplesNo complex operations, just focus on simple things.Inspired byrclone.Installationpipinstallcloud-storage-slimUsagefromcloud_storage_slimimportCloudStorageSlimcloud_storage=CloudStorageSlim()cloud_storage.copyto('gs://bucket1/object1','az://bucket2/object2')FeaturescopytolsSupported Cloud StorageGoogle Cloud StorageAzure Blob StorageAlibabaCloud / Aliyun OSSAWS S3CredentialsGoogle Cloud StorageHow Application Default Credentials worksGOOGLE_APPLICATION_CREDENTIALSgoogle-cloud-pythonpipinstallgoogle-cloud-storageAmazon S3Boto3 Configuring credentialsUsing environment variablesAWS_DEFAULT_REGIONAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYAWS_SESSION_TOKENBoto3pipinstallboto3Azure Blob StorageManage storage account access keysAZURE_STORAGE_ACCOUNT_NAME,AZURE_STORAGE_ACCOUNT_KEYpipinstallazure-storage-blobazure-identityAlibabaCloud / Aliyun OSSConfigure access credentialsOSS_ENDPOINTOSS_ACCESS_KEY_ID,OSS_ACCESS_KEY_SECRETOSS_SESSION_TOKENoss2pipinstalloss2Test casesbefore run test cases, you need to prepare the test bucket.
Package: cloud-storage-utility
Cloud Storage UtilityA Python based cloud utility to help you transfer files to and from multiple cloud providers under one CLI/API.Supported Cloud PlatformsPlatformImplementedIBM Cloud✅Azure❌ Coming Soon!AWS❌ Coming Soon!Installationpipinstallcloud-storage-utilityUsageConfigurationTo configure this application, you have to set a few environment variables.# Currently we only support 'ibm'
CSUTIL_CLOUD_PLATFORM=

# You only need to set these if you intend to use ibm
CSUTIL_IBM_API_KEY=
CSUTIL_IBM_AUTH_ENDPOINT=
CSUTIL_IBM_COS_ENDPOINT=

# If `CSUTIL_IBM_API_KEY` is undefined, we will attempt to use `IBMCLOUD_API_KEY` instead.CLI CommandsYou can usecsutil --helpto see an exhaustive list of options and commandscsutil delete <bucket name> <filename>
csutil list-remote <bucket name>
csutil pull <bucket name> <destination directory>  <cloud-files>
csutil push <bucket name> <local-files>Here are some examplescsutil delete example-bucket *.txt
csutil delete example-bucket *.txt *.md example.csv

csutil list-remote example-bucket

csutil pull example-bucket ./dat *
csutil pull example-bucket ./dat tmp.txt tmp2.txt *.md

csutil push example-bucket ./dat/*
csutil push example-bucket/test_directory ./dat/tmp.txt ./dat/tmp2.txtPython APIExample usageimportasynciofromcloud_storage_utility.file_brokerimportFileBrokerconfig=IbmConfiguration(auth_endpoint="http://ibm-endpoint.com/auth",cos_endpoint="https://ibm-endpoint.com/cos",api_key="<api-key>")asyncdefmain():asyncwithFileBroker(config)asfile_broker:file_broker.download_files(bucket_name="test-bucket",local_directory="./data",file_names=["tmp.txt1","tmp2.txt"],)if__name__=="__main__":asyncio.run(main())Check out theAPI docsfor many more detailed examples!Developing LocallyWe usepipenvto manage packages. If you don't already have it installed, make sure to install it viapip install pipenv.We also usepython-dotenvfor managing env vars for local development, so you can create a .env file for yourself and set the relevant vars that way.# You can use any python version, but I recommend 3.9pipenv--python3.9# Gotta use the pre flag because of the code formatterpipenvinstall--dev--preNow you're all set to start writing code!https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-object-operations
Package: cloudstructs
cloudstructsHigh-level constructs for AWS CDKInstallationnpm install cloudstructsoryarn add cloudstructsVersion >= 0.2.0 requires AWS CDK v2.ConstructsCodeCommitMirrorMirror a repository to AWS CodeCommit on scheduleEcsServiceRollerRoll your ECS service tasks on schedule or with
a ruleEmailReceiverReceive emails through SES, save them to S3
and invoke a Lambda functionSlackAppDeploy Slack apps from manifestsSlackEventsSend Slack events to Amazon EventBridgeSlackTextractExtract text from images posted to Slack
using Amazon Textract. The extracted text is posted in a thread under the image
and gets indexed!SslServerTestTest a server/host for SSL/TLS on schedule and
get notified when the overall rating is not satisfactory.Powered by Qualys SSL Labs.StateMachineCustomResourceProviderImplement custom
resources with AWS Step Functions state machinesStaticWebsiteA CloudFront static website hosted on S3 with
HTTPS redirect, SPA redirect, HTTP security headers and backend configuration saved
to the bucket.ToolkitCleanerClean unused S3 and ECR assets from your CDK
Toolkit.UrlShortenerDeploy an URL shortener API
Package: cloudswitch
python-cloudswitchcloud instance managerUsage: cloudswitch
   [-U|--start]
   [-D|--stop]
   [-L|--list]
   [-r|--region] <region>
   [-t|--tag] <name:value>
   [-v|--verbose]start all stopped instancespython cloudswitch.py -Ustop all running instancespython cloudswitch.py -Dstart by tagpython cloudswitch.py -U -t tagname:tagvalueMultiple tags:python cloudswitch.py -U -t postgres:master -t postgres:replicastart by regionpython cloudswitch.py -U -r eu-north-1Multiple regions are also accepted:python cloudswitch.py -U -r eu-north-1 -r eu-south-1 -r eu-picamoixons-3list instances on a particular regionpython cloudswitch.py -L -r eu-west-1list instances using a particular tagpython cloudswitch.py -L -r postgres:master
Package: cloudsyaml
Simple library and CLI to explore the clouds.yamlIf you manage a big OpenStack cloud, you may find yourself in a situation with a lot of entries in your clouds.yaml file.
The problem is that you need to configure a separate cloud for each project.
Moreover, they multiplied by the count of regions in your deployment.
Thecloudsyamlpackage, which provides simplecloudsutility will simplify exploring such a yaml-based database.List configured clouds$ clouds list
admin
octavia
octavia-testosFilter clouds by keywords$ clouds list --grep octavia --grep testos
octavia-testosList configured clouds in format of export command for shell$ clouds list --eval
export OS_CLOUD=admin
export OS_CLOUD=octavia
export OS_CLOUD=octavia-testosGet info about one cloud$ clouds show adminadmin:auth:auth_url:https://cloud.example.com:5000password:'******'project_domain_name:Defaultproject_name:adminuser_domain_name:Defaultusername:adminidentity_api_verion:'3'region_name:SPBList configuration files used by SDK$ clouds files
+-------------+--------------------------------------------------+
| name        | path                                             |
+-------------+--------------------------------------------------+
| clouds.yaml | /Users/igor.tiunov/.config/openstack/clouds.yaml |
| secure.yaml | /Users/igor.tiunov/.config/openstack/secure.yaml |
+-------------+--------------------------------------------------+
Package: cloud-tasks-deferred-v2
cloud-tasks-deferred-v2A deferred library for Google Cloud Tasks.Fork ofpython-cloud-tasks-deferredoriginally created byAtsushi Hanaoka.Key differencesMigrated to google-cloud-tasks 2.0.0Dropped Python 2 supportAdded Flask integrationInstallationAddd following handler to your app.yaml-url:/_tasks/deferredscript:cloud_tasks_deferred.wsgi.applicationlogin:adminInitialize module in flaskfromcloud_tasks_deferred_v2.flaskimportinit_deferredinit_deferred(app)PrerequisitesEnvironment variableQUEUE_LOCATIONin which Cloud Tasks service runsUnavailable options_transactional: Transactional tasks are unavailable in Cloud Tasks_retry_options: Retry options for tasks are unavailable in Cloud
TasksUnimplemented featuresSupport for tasks larger than 10 KB
Package: cloud-time-saver
cloud_time_savercloud_time_saver is a python command-line application, that lets us control our AWS environment automatically without leaving the terminal.
It is designed to be used only on the Linux operating system.IntroductionThe goal of this application is to speed up and simplify working with AWS and thus save users a lot of time.In addition, it personally never suited me to use the AWS CLI, so I decided to do something similar, only my application was adapted for easier understanding and use.Installation stepsPreinstallationBefore installation please make sure that you have python3 installed.After that one more thing. For this program to work you must have AWS account configured on your system.
If you do not have a configured account, you must first install AWS CLI.
Then create a new user in the AWS console. When done, run the AWS configure command and add credentials for the created user to it.
On Ubuntu OS that should look similar to this:/*installingAWSCLI*/sudoapt-getinstallawscli/*nowcreatenewuserinAWSConsole*//*runningawsconfigurewillpromptyouforusercredentials*/awsconfigureIf you get errors when running application regarding to your AWS User settings, you can run: pip3 install --upgrade awscliInstallationNow when we are done with configuring our account we can install cloud_time_saver with this command:pipinstallcloud-time-saverIf you want to run the cloud_time_saver command globally you should consider adding the installation directory to your PATH variable.OptionsWhen you run cloud_time_saver you will have 3 options to choose from:run ( starts application )help ( provides you with documentation )exit ( exits application )helpI recommend running the help command first, and seeing what kind of commands we can run. At first glance, this app may be a bit confusing, but a good look at the documentation should resolve disagreements.
This is how the help page looks like:
Package: cloudtipsadp
cloudtips-adpCloudTips Adapter позволяет интегрировать прием донатов в Django приложение.СтартУстановкаpip install cloudtipsadpУдаление пакетаpip uninstall cloudtipsadpЗависимости разрешить [^1]pip install python-dotenv requests python-magic dependency-injectorНастройка переменных окруженияВ корне проекта создать файл .envФайл .env используется для тестов. В production установить переменные
окружения уровня сеанса пользователя или системы.sudo touch .envДля авторизации на CloudTips добавить настройки в файл .envplaceId - идентификатор вашего заведения (в админке CloudTips)CTA_GRANT_TYPE=password
CTA_CLIENT_ID=Partner
CTA_USER_NAME=<your_email>
CTA_PASSWORD=<your_password>
CTA_PLACE_ID=<your_placeId>

# Production. Раскомментировать
#CTA_BASE_URL=https://identity.cloudtips.ru
#CTA_BASE_URL_API=https://api.cloudtips.ru/api

# Production. Закомментировать
CTA_BASE_URL=https://identity-sandbox.cloudtips.ru
CTA_BASE_URL_API=https://api-sandbox.cloudtips.ruРабота с пакетомПодключениеimport cloudtipsadp as ctaПолучательСоздать получателя донатовresponse = cta.receivers_create(name, phone_number)Удалить получателя из скоупаresponse = cta.receivers_detach_agent(user_id)Все получатели донатовresponse = cta.receivers_pages()Загрузка фотографии получателяresponse = cta.receivers_photo(user_id, photo_path)Вариант просмотра результата ответа сервераif type(response) == dict and response.get('succeed'):
    print(response.get('data'))
else:
    print(response)ЗаведенияИнформация по всем заведениям ТСПresponse = cta.places_get()Привязка получателя к заведению. Отправить сотруднику на его номер телефона код в смс сообщении.response = cta.places_send_sms(user_id)Подтверждение привязки телефона (пользователя) к предприятию. Передать код из смс.response = cta.places_confirm(user_id, code)КартыСписок карт получателяresponse = cta.cards_get(user_id)Отправить криптограммуresponse = cta.cards_auth(user_id, checkout)Для проведения 3-D Secure аутентификацииresponse = cta.cards_3ds(user_id, md, paReq)Изменить карту, которая по умолчаниюresponse = cta.cards_default(user_id, card_token)Удаление карты получателя. Карту по умолчанию удалить нельзяresponse = cta.cards_delete(user_id, card_token)Подтвердить привязку карты на стороне системыresponse = cta.cards_add(user_id, transact_id)НакопленияНакопления по получателюresponse = cta.accums_summary(user_id)Выплата накопления получателюresponse = cta.accums_payout_receiver(user_id)ТранзакцииПолучение всех транзакций выплат получателям менеджераresponse = cta.payouts()Возможные проблемы[^1]: Если возникли проблемы с установкой пакета python-magic на macos
установите:brew install libmagic 
pip uninstall python-magic
pip install python-magic-bin
Package: cloudtoken-plugin.okta
# Cloudtoken OKTA Auth PluginThis is an OKTA auth plugin for [Cloudtoken](https://bitbucket.org/atlassian/cloudtoken).## Installation$ pip3 install cloudtoken-plugin.okta## Configuring CloudtokenYou will need to add the `okta` plugin to auth section your `~/.config/cloudtoken/config.yaml` and have the `saml` pluginimmediately after it. You `config.yaml` should look something like this:auth:- okta- samlYou will also need to add both a gui flag (for an ugly, but functional popup), and the OKTA url into `config.yaml` as a top level key. Your config.yaml should look somethinglike this:okta_url: 'https://mydomain.okta.com/'gui: Trueplugins:pre_auth:auth:- okta- samlpost_auth:- export_credentials_shell## 401's when authenticating?IIS might be trying to authenticate your credentials using Windows Authentication instead of Forms authentication.You can follow the instructions [here](http://www.richardawilson.com/2010/10/adfs-20-login-page.html) to fix that.## ContributorsPull requests, issues and comments welcome. For pull requests:* Add tests for new features and bug fixes* Follow the existing style* Separate unrelated changes into multiple pull requestsSee the existing issues for things to start contributing.For bigger changes, make sure you start a discussion first by creatingan issue and explaining the intended change.Atlassian requires contributors to sign a Contributor License Agreement,known as a CLA. This serves as a record stating that the contributor isentitled to contribute the code/documentation/translation to the projectand is willing to have it used in distributions and derivative works(or is willing to transfer ownership).Prior to accepting your contributions we ask that you please follow the appropriatelink below to digitally sign the CLA. The Corporate CLA is for those who arecontributing as a member of an organization and the individual CLA is forthose contributing as an individual.* [CLA for corporate contributors](https://na2.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=e1c17c66-ca4d-4aab-a953-2c231af4a20b)* [CLA for individuals](https://na2.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=3f94fbdc-2fbe-46ac-b14c-5d152700ae5d)## LicenseCopyright (c) 2016 Atlassian and others.Apache 2.0 licensed, see [LICENSE.txt](LICENSE.txt) file.
Package: cloud-toolkit-aws
Cloud Toolkit AWSThe Cloud Toolkit AWS provider for Pulumi provision well-architected solutions inAWS. With Cloud Toolkit AWS you can use your preferred programming language to manage your platform with Infrastructure as Code.InstallJavaScript / TypeScriptTo use from JavaScript or TypeScript, install using eithernpm:npminstall@cloudtoolkit/awsoryarn:yarnadd@cloudtoolkit/awsPythonTo use from Python, install usingpip:pipinstallcloud-toolkit-awsConfigurationTo provision resources with the Cloud Toolkit AWS provider, you need to have AWS credentials. You can use the instructions on if you plan to use AWS credentials from a shared credentials file (which the AWS CLI usually manages for you) or from an environment variable. For more details, see theAWS documentation.ExamplesJavaScript / TypeScriptCreate a private Bucket:constct=require("@cloudtoolkit/aws");constbucket=newct.storage.Bucket("mybucket");PythonCreate a private Bucket:importcloud_toolkit_awsasctbucket=ct.storage.Bucket("bucket")DevelopmentVisit thedevelopment page.
Package: cloud-tqdm
cloud-tqdmvisualize the progress of a Python script on the web.cloud-tqdminherits fromtqdm, so it can be run in the same way as tqdm.Installationpipinstallcloud-tqdmUsageVisualize the progress of a Python script on the web.importtimefromcloud_tqdmimportcloud_tqdmforiincloud_tqdm(range(30),desc="Processing"):print(i)time.sleep(1)cloud-tqdm→https://cloud-tqdm....123Multiple progresses can be displayed on the same page by connectingpidwith URLs.https://cloud-tqdm.web.app/progress?pid=-MBm07wc3HJ-JZfeOc5a&pid=-MBm0JSG-NQ6HswT81Ru&pid=-MBm0Qyc8lIbWzfArUYwRelated repositoriescloud-tqdm-apicloud-tqdm-appFutureDo not interfere with existing progress displays.Implements of Test.Grouping of progress by user or device.Publish URLs that group progress by user or device.Discard the progress from the DB when a certain amount of time has passed since the last update.
Package: cloud-translator
cloud-translatorUse the same api to call the third party translator apis, such as google, tencent, baidu.PrerequisitePython 3.7 or more latest versionInstallationpipinstallcloud-translatorUsageThe library support GoogleTranslator, TencentTranslator, BaiduTranslator, where GoogleTranslator depends onpy-googletranswhich not needs appid and appkey, but is not stable and probably blocked by google.TencentTranslator and BaiduTranslator are rewritted with reference to the offical demo script to support python 3.7 versionfromtranslatorimport*# use googletranslator=GoogleTranslator()print(translator.translate('我是中国人',dest='en'))# use baidu apitranslator=BaiduTranslator(appid,appkey)print(translator.translate('我是中国人',dest='en'))# use tencent apitranslator=TencentTranslator(appid,appkey)print(translator.translate('我是中国人',dest='en'))# throttle api call frequency.translate_func=throttle(seconds=1)(translator.translate)# call api every secondforiinrange(100):translate_func('我是中国人',dest='en')
Package: cloud-tts-tool
Cloud TTSThis package is in development but will allow you to easily connect to a variety of text to speach apis.Please set keyring items:Google Cloud:https://cloud.google.com/iam/docs/service-accounts-create#python consoleimportkeyringkeyring.set_password("google_tts","google_private_key_id","<GOOGLE_PRIVATE_KEY_ID_FROM_JSON>")keyring.set_password("google_tts","google_private_key","<GOOGLE_PRIVATE_KEY_FROM_JSON>")keyring.set_password("google_tts","google_client_email","<GOOGLE_CLIENT_EMAIL>")The other items don't appear to matter.#AWS Polly:
in console, IAM, Users, Add user,
choose a username
Attatch Policies Directly
select only "AmazonPollyReadOnlyAccess"
Create User, copy Access key ID and Secret access key and add them to your keychain#python consoleimportkeyringkeyring.set_password("aws_tts","aws_access_key_id","<AWS_ACCESS_KEY_ID>")keyring.set_password("aws_tts","aws_secret_access_key","<AWS_SECRET_ACCESS_KEY>")`#Microsoft Azure:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=script%2Cwindowsinstall&pivots=programming-language-pythonCreate Speech Services resource
Pay-as-you-go/DefaultResourceGroup-CUS
Choose region
Name resource (don't use spaces or underscores)
Chose pricing tier (free allows for about an hour of neural voice per month)
Network type: Selected Network
create new virtual network and subnet
put your ip address in the firewall  (https://www.google.com/search?q=what+is+my+ip)
Review and Create
CreateFrom home you should see the name of your resource, click on it
Click Manage Keys
Copy Key 1 and add it to your keychain
Copy Location/Region and add it to your keychain (not really a secret, but since
your key is tied to a region, it's nice to have it in the same place)#python consoleimportkeyringkeyring.set_password("azure_tts","azure_key","<AZURE_KEY_1>")keyring.set_password("azure_tts","azure_region","<AZURE_REGION>")Usageimportkeyringfromcloud_ttsimportget_voicesplatform="google"# or "aws" or "azure"voice_list=get_voices(platform)# print out the voicesforvoiceinvoice_list:print(f'{voice["id"]}{voice["name"]}{voice["language"]}')Send text to cloudfromcloud_ttsimportmake_tts,example_textaudio_content=make_tts(text=example_text(),voice="en-US-Wavenet-A",platform="google",loc="en_US",gender="FEMALE")#save audiofilename="example.mp3"withopen("example.mp3","wb")asf:f.write(audio_content)
Package: cloud-utility
Welcome to Cloud UtilityA python based cloud utility for multiple cloud providers under one CLI/APISupported Cloud PlatformGoogle Cloud PlatformGoogle Cloud Storage APIInstallationpipinstallcloud_utilityPrerequisitePlease make sure you have setup environment variable "GOOGLE_APPLICATION_CREDENTIALS" with the google service account json key inside your codeimportosos.environ["GOOGLE_APPLICATION_CREDENTIALS"]="/path/to/key.json"fromoauth2client.clientimportGoogleCredentials# Grab the application's default credentials from the environment.credentials=GoogleCredentials.get_application_default()or,
explicitly set-up the environment variable:bash export GOOGLE_APPLICATION_CREDENTIALS=key.jsonHow to use?fromgoogle_storage_utilityimportGoogle_Storage_Utilityasgsua=gsu("<google-project-id>")
Package: cloudvault
Project Descriptioncloudvaultcloudvault is a django package for file upload similar to using AWS S3-Bucket. It uses theCloudinaryPlatform which is cheaper and easier to integrate.Quickly deploy or test your django application usingcloudvault.Installationpip install cloudvaultQuick StartAdd "cloudvault" to yourINSTALLED_APPSin settings.pyINSTALLED_APPS = [
    # other apps
    "cloudvault",
]Configure yourCloudinary settingsCLOUDINARY = [
    "cloud_name": "",
    "api_key": "",
    "api_secret": ""
]ChangeDEFAULT_FILE_STORAGEin your settings.pyDEFAULT_FILE_STORAGE = "cloudvault.cloud_storage.CloudinaryStorage"You can now upload image, videos from here.