Code Monkey home page Code Monkey logo

google-cloud-python's Introduction

Google Cloud Python Client

Python idiomatic clients for Google Cloud Platform services.

Stability levels

The development status classifier on PyPI indicates the current stability of a package.

General Availability

GA (general availability) indicates that the client library for a particular service is stable, and that the code surface will not change in backwards-incompatible ways unless either absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against GA libraries are addressed with the highest priority.

GA libraries have development status classifier Development Status :: 5 - Production/Stable.

Note

Sub-components of GA libraries explicitly marked as beta in the import path (e.g. google.cloud.language_v1beta2) should be considered to be beta.

Beta Support

Beta indicates that the client library for a particular service is mostly stable and is being prepared for release. Issues and requests against beta libraries are addressed with a higher priority.

Beta libraries have development status classifier Development Status :: 4 - Beta.

Alpha Support

Alpha indicates that the client library for a particular service is still a work-in-progress and is more likely to get backwards-incompatible updates. See versioning for more details.

Alpha libraries have development status classifier Development Status :: 3 - Alpha.

If you need support for other Google APIs, check out the Google APIs Python Client library.

Libraries

Client Release Level Version
AI Platform PyPI-google-cloud-aiplatform
App Engine Admin PyPI-google-cloud-appengine-admin
Asset Inventory PyPI-google-cloud-asset
AutoML PyPI-google-cloud-automl
BigQuery PyPI-google-cloud-bigquery
BigQuery Storage PyPI-google-cloud-bigquery-storage
Bigtable PyPI-google-cloud-bigtable
Binary Authorization PyPI-google-cloud-binary-authorization
Build PyPI-google-cloud-build
Common PyPI-google-cloud-common
Compute Engine PyPI-google-cloud-compute
Container Analysis PyPI-google-cloud-containeranalysis
Datastore PyPI-google-cloud-datastore
Filestore PyPI-google-cloud-filestore
Firestore PyPI-google-cloud-firestore
GKE Hub PyPI-google-cloud-gke-hub
Grafeas PyPI-grafeas
Identity and Access Management PyPI-grpc-google-iam-v1
Key Management Service PyPI-google-cloud-kms
Logging PyPI-google-cloud-logging
Monitoring Dashboards PyPI-google-cloud-monitoring-dashboards
NDB Client Library for Datastore PyPI-google-cloud-ndb
OS Login PyPI-google-cloud-os-login
Pandas Data Types for SQL systems (BigQuery, Spanner) PyPI-db-dtypes
Pub/Sub PyPI-google-cloud-pubsub
Pub/Sub Lite PyPI-google-cloud-pubsublite
Service Management PyPI-google-cloud-service-management
Spanner PyPI-google-cloud-spanner
Spanner Django PyPI-django-google-spanner
Speech PyPI-google-cloud-speech
Stackdriver Monitoring PyPI-google-cloud-monitoring
Storage PyPI-google-cloud-storage
Trace PyPI-google-cloud-trace
Translation PyPI-google-cloud-translate
Vision PyPI-google-cloud-vision
A unified Python API in BigQuery PyPI-bigframes
Analytics Admin PyPI-google-analytics-admin
Analytics Data PyPI-google-analytics-data
Audit Log PyPI-google-cloud-audit-log
BigQuery connector for pandas PyPI-pandas-gbq
DNS PyPI-google-cloud-dns
Dataflow PyPI-google-cloud-dataflow-client
Document AI Toolbox PyPI-google-cloud-documentai-toolbox
Error Reporting PyPI-google-cloud-error-reporting
Run PyPI-google-cloud-run
Runtime Configurator PyPI-google-cloud-runtimeconfig
SQLAlchemy dialect for BigQuery PyPI-sqlalchemy-bigquery

Example Applications

  • getting-started-python - A sample and tutorial that demonstrates how to build a complete web application using Cloud Datastore, Cloud Storage, and Cloud Pub/Sub and deploy it to Google App Engine or Google Compute Engine.
  • google-cloud-python-expenses-demo - A sample expenses demo using Cloud Datastore and Cloud Storage.

Authentication

With google-cloud-python we try to make authentication as painless as possible. Check out the Getting started with authentication in our documentation to learn more.

License

Apache 2.0 - See the LICENSE for more information.

google-cloud-python's People

Contributors

alixhami avatar busunkim96 avatar chemelnucfin avatar crwilcox avatar dandhlee avatar danoscarmike avatar daspecster avatar dhermes avatar dpebot avatar gcf-owl-bot[bot] avatar google-cloud-policy-bot[bot] avatar jba avatar jgeewax avatar justinbeckwith avatar lukesneeringer avatar m-strzelczyk avatar nnegrey avatar owlbot-bootstrapper[bot] avatar parthea avatar plamut avatar release-please[bot] avatar renovate-bot avatar silvolu avatar surferjeffatgoogle avatar theacodes avatar tseaver avatar tswast avatar vchudnov-g avatar yoshi-automation avatar yoshi-code-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-cloud-python's Issues

Make gcloud.storage use a streaming HTTP library for downloads

Right now we're using httplib2 because of oauth2client working really nicely with that, however httplib2 doesn't support a streaming download.

This means, a .request() will load the entire response content into memory, which won't work at all for a big file.

To get around this, we chunk the file up using the Range HTTP header and request pieces of it until the end, however the better way to handle this is with a streaming HTTP library:

stream = <send http request>
with open('output.txt', 'wb') as output:
  data = stream.read(CHUNK_SIZE)
  while data:
    output.write(data)
    data = stream.read(CHUNK_SIZE)

To make this work we need to:

  • use a library that does support streaming
  • update oauth2client to work with that library

Add async methods

Is there a way to run multiple requests in parallel?
It would be really nice to be able to execute requests asynchronously, e.g.

future = Query('MyKind').fetch_async()
result = future.get_result()

NDB has a great support for async operations using an event loop.

Is it something you guys might consider for future versions of the client?

Should datastore Key's be immutable?

This seems like a pain in the ass to deal with if they are:

entity = dataset.entity('Person')
entity.key(entity.key().name('name'))

versus

entity = dataset.entity('Person')
entity.key().name('name')

What do we really get by making a Key immutable?

A Query being immutable makes great sense - chaining things together is easy and you can "fork" a query into several different ones. But it's unlikely we'll need to fork a key...

datetime property

I not sure is it is a bug but when I have tried save() a entity with a datetime property appear this error.

pb_attr, pb_value = helpers.get_protobuf_attribute_and_value(value)
File "/usr/local/lib/python2.7/dist-packages/gcloud/datastore/helpers.py", line 39, in get_protobuf_attribute_and_value
name, value = 'timestamp_microseconds', time.mktime(val.timetuple())
NameError: global name 'time' is not defined

If you don't have python-dev and are trying to build crypto, throw an error.

Right now we leave people guessing when a gcc command fails.

Let's check for pycrypto and pyopenssl, and if they're not there, make sure that python-dev is installed so that the compilation won't fail. Otherwise, say you need to install the dev Python stuff or the actual packages for openssl and crypto...

(linux specific)

Let's also check into this for Windows and Mac - maybe they have their act together and do this properly...

attribute 'timedelta' Datetime property when performance a Query

File "/home/albertog/Documents/spyder-2.3.0beta1/scripts/semtable/test/test.py", line 43, in main
q.fetch(1)

File "gcloud/datastore/query.py", line 247, in fetch
return [Entity.from_protobuf(entity) for entity in entity_pbs]

File "gcloud/datastore/entity.py", line 148, in from_protobuf
value = helpers.get_value_from_protobuf(property_pb)

File "gcloud/datastore/helpers.py", line 82, in get_value_from_protobuf
datetime.timedelta(microseconds=microseconds))

AttributeError: type object 'datetime.datetime' has no attribute 'timedelta'

How can we cover unit testing for datastore?

Right now, the only way to develop this is by hitting the live Cloud Datastore API. Is there a way we can use these API calls in unit tests without mocking?

Can we have a "local datastore" server that understands the API and makes it easy for local development?

libffi-dev a dependency?

I just installed from scratch and it appears that libffi-dev was a dependency package. Not sure where or how... but that fixed the errors I was getting...

Can we add this to the README ?

Make datastore demo interactive

We can use raw_input(), etc to take names and other fields from the user to make the process more interactive while getting started (and show the code we're actually running as we run it).

Add support for namespaces

These exist to an extent but aren't universal and certainly not well documented.

There are two options:

  1. Create an object to manage namespaces
from gcloud import datastore
dataset = datastore.get_dataset(...)
namespace = dataset.namespace('my-namespace')
person = namespace.entity('Person')
person['name'] = 'JJ'
person.save()

query = namespace.query('Person')
print query.fetch()
  1. Allow users to pass a namespace argument to various constructors (and set namespaces with a method, akin to setting a kind or id on a Key).
from gcloud import datastore
dataset = datastore.get_dataset(...)
person = dataset.entity('Person')
person.namespace('my-namespace')
person['name'] = 'JJ'
person.save()

query = dataset.query('Person').namespace('my-namespace')
print query.fetch()

or

person = namespace.entity('Person')
person['name'] = 'JJ'
person.save(namespace='my-namespace')

I currently prefer option 2, where a namespace isn't a separate level in the hierarchy, but simply a flag passed around on queries or entities.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.