Python 2.7 telah mencapai akhir dukungan
dan akan dihentikan penggunaannya
pada 31 Januari 2026. Setelah penghentian penggunaan, Anda tidak akan dapat men-deploy aplikasi Python 2.7, meskipun organisasi Anda sebelumnya menggunakan kebijakan organisasi untuk mengaktifkan kembali deployment runtime lama. Aplikasi Python 2.7 yang ada akan terus berjalan dan menerima traffic setelah
tanggal penghentiannya. Sebaiknya Anda bermigrasi ke versi Python terbaru yang didukung.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
API ini berada dalam modul google.appengine.ext.ndb.metadata, yang biasanya digunakan melalui from google.appengine.ext.ndb import metadata.
Functions
get_entity_group_version(kunci)
Menampilkan versi entity group yang berisi kunci.
Versi ini dijamin akan meningkat setiap ada perubahan pada entity group. Versi ini dapat meningkat meskipun tidak ada perubahan yang terlihat oleh pengguna pada entity group. Dapat menampilkan None jika entity group tidak pernah dituliskan.
Peringatan: Perilaku metadata entity group kini berbeda. Versi entity group dapat meningkat secara terpisah dari update pengguna. Sebelumnya, versi entity group hanya meningkat saat update pengguna. Untuk mempertahankan perilaku lama, gunakan solusi versi entity group.
Argumen
kunci
kunci untuk entity group.
get_namespaces(start=None, end=None)
Menampilkan daftar nama namespace.
Argumen
mulai
Jangan tampilkan nama namespace sebelum ini dalam urutan abjad.
selesai
Jangan tampilkan nama namespace setelah ini dalam urutan abjad.
get_kinds(start=None, end=None):
Menampilkan daftar nama jenis dalam namespace saat ini.
Argumen
mulai
Jangan menampilkan nama jenis sebelum ini dalam urutan abjad.
selesai
Jangan menampilkan nama jenis setelah ini dalam urutan abjad.
Menampilkan nama properti pemetaan dict untuk nama jenis tertentu ke daftar nama representasi seperti 'STRING', 'BOOLEAN', atau 'INT64'.
Hanya melihat dalam namespace saat ini.
Untuk daftar lengkap jenis Representasi ini, lihat
Jenis Representasi
Menampilkan daftar nama properti untuk nama kind tertentu.
Argumen
jenis
Properti jenis yang akan dicantumkan.
mulai
Jangan tampilkan nama properti sebelum ini dalam urutan abjad.
selesai
Jangan tampilkan nama properti setelah ini dalam urutan abjad.
Jenis Representasi
Class Property
Representasi
StringProperty
STRING
BooleanProperty
BOOLEAN
IntegerProperty
INT64
FloatProperty
DOUBLE
DateTimeProperty
DateProperty
TimeProperty
INT64
UserProperty
PENGGUNA
BlobProperty
STRING
BlobKeyProperty
STRING
TextProperty
STRING
GeoPtProperty
POINT
GenericProperty
(Tergantung nilai yang disimpan.)
ComputedProperty
(Tergantung nilai yang disimpan.)
JsonProperty
STRING
PickleProperty
STRING
StructuredProperty
(Ketika Anda mendapatkan jenis representasi, properti StructuredProperty tidak akan ditampilkan. Sebagai gantinya, properti akan menampilkan nilai untuk sub-properti yang sesuai dengan jenis properti-nya.)
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis API, located in the \u003ccode\u003egoogle.appengine.ext.ndb.metadata\u003c/code\u003e module, is designed for use in first-generation runtimes within the App Engine standard environment, and users migrating to Python 3 should consult the migration guide.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eget_entity_group_version(key)\u003c/code\u003e function retrieves the version of an entity group, which increases with every change, potentially even without user-visible updates, and a workaround is available for maintaining legacy behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eget_namespaces(start=None, end=None)\u003c/code\u003e, \u003ccode\u003eget_kinds(start=None, end=None)\u003c/code\u003e, \u003ccode\u003eget_properties_of_kind(kind, start=None, end=None)\u003c/code\u003e and \u003ccode\u003eget_representations_of_kind(kind, start=None, end=None)\u003c/code\u003e functions are used to list namespace names, kind names, property names and representation names respectively, with options for specifying alphabetical start and end boundaries.\u003c/p\u003e\n"],["\u003cp\u003eThe document outlines the various property classes and their corresponding representation types, such as \u003ccode\u003eStringProperty\u003c/code\u003e to \u003ccode\u003eSTRING\u003c/code\u003e and \u003ccode\u003eIntegerProperty\u003c/code\u003e to \u003ccode\u003eINT64\u003c/code\u003e, for different data types.\u003c/p\u003e\n"]]],[],null,["# NDB Metadata Reference\n\n| This page describes how to use the legacy bundled services and APIs. This API can only run in first-generation runtimes in the App Engine standard environment. If you are updating to the App Engine Python 3 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/python-differences) to learn about your migration options for legacy bundled services.\n\nThis API is in the `google.appengine.ext.ndb.metadata` module,\ntypically used via\n`from google.appengine.ext.ndb import metadata`.\n\nFunctions\n---------\n\nget_entity_group_version(key)\n: Return the version of the entity group containing key.\n This version is\n guaranteed to increase on every change to the entity group. The version may\n increase even in the absence of user-visible changes to the entity\n group. May return `None`\n if the entity group was never written to.\n\n **Warning** : The behavior of entity group metadata is now different. The entity\n group version can increase independently of user updates. Previously, the entity\n group version increased only on user update. To maintain legacy behavior, use the\n [entity group version workaround](https://support.google.com/cloud/answer/9133787#zippy=python-ndb).\n\n **Arguments**\n\n key\n : key for an entity group.\n\n\nget_namespaces(start=None, end=None)\n\n: Returns a list of namespace names. **Arguments**\n\n start\n : Don't return namespace names before this in alphabetical order.\n\n end\n : Don't return namespace names after this in alphabetical order.\n\nget_kinds(start=None, end=None):\n\n: Returns a list of kind names in the current namespace. **Arguments**\n\n start\n : Don't return kind names before this in alphabetical order.\n\n end\n : Don't return kind names after this in alphabetical order.\n\nget_properties_of_kind(kind, start=None,\nend=None):\n: Returns a list of property names for the given \u003cvar translate=\"no\"\u003ekind\u003c/var\u003e name\n in the current namespace.\n\n **Arguments**\n\n kind\n : Which kind's properties to list.\n\n start\n : Don't return property names before this in alphabetical order.\n\n end\n : Don't return property names after this in alphabetical order.\n\n\nget_representations_of_kind(kind, start=None,\nend=None)\n: Returns a `dict` mapping property names for the given kind name\n to lists of representation names such as 'STRING', 'BOOLEAN' or 'INT64'.\n Only looks in the current namespace.\n For a complete list of these types, see\n [Representation Types](#representations)\n\n: Returns a list of property names for the given \u003cvar translate=\"no\"\u003ekind\u003c/var\u003e name.\n\n **Arguments**\n\n kind\n : Which kind's properties to list.\n\n start\n : Don't return property names before this in alphabetical order.\n\n end\n : Don't return property names after this in alphabetical order.\n\nRepresentation Types\n--------------------"]]