The C++ API provides functions to create Python objects from C++ objects and to retrieve the C++ object stored in the Python object. An object may have another Python object as its owner and keeps its owner alive for its lifetime. Some objects require an owner of a specific type, while others require none. Refer to the sections below for details.
The C++ API names use the name of the class in apt_pkg and are prefixed with Py. For each supported class, there is a _Type object, a _Check() function, a _CheckExact() function, a _FromCpp() and a _ToCpp() function.
New in version 0.7.100.
The type object for apt_pkg.Acquire objects.
Check that the object object is an apt_pkg.Acquire object, or a subclass thereof.
Check that the object object is an apt_pkg.Acquire object and no subclass thereof.
Create a new apt_pkg.Acquire object from the pkgAcquire pointer given by the parameter acquire. If the parameter delete is true, the object pointed to by acquire will be deleted when the refcount of the return value reaches 0.
The type object for apt_pkg.AcquireFile objects.
Check that the object object is an apt_pkg.AcquireFile object, or a subclass thereof.
Check that the object object is an apt_pkg.AcquireFile object and no subclass thereof.
Create a new apt_pkg.AcquireFile object from the pkgAcqFile pointer given by the parameter file. If the parameter delete is true, the object pointed to by file will be deleted when the reference count of the returned object reaches 0. The parameter owner should point to a apt_pkg.Acquire object.
The type object for apt_pkg.AcquireItem objects.
Check that the object object is an apt_pkg.AcquireItem object, or a subclass thereof.
Check that the object object is an apt_pkg.AcquireItem object and no subclass thereof.
Create a new apt_pkg.AcquireItem object from the pkgAcquire::Item pointer given by the parameter item. If the parameter delete is true, the object pointed to by item will be deleted when the reference count of the returned object reaches 0. The parameter owner should point to a apt_pkg.Acquire object.
The type object for apt_pkg.AcquireItemDesc objects.
Check that the object object is an apt_pkg.AcquireItemDesc object, or a subclass thereof.
Check that the object object is an apt_pkg.AcquireItemDesc object and no subclass thereof.
Create a new apt_pkg.AcquireItemDesc object from the pkgAcquire::ItemDesc pointer given by the parameter desc. If the parameter delete is true, the object pointed to by desc will be deleted when the reference count of the returned object reaches 0. The parameter owner should point to a apt_pkg.AcquireItem object.
The type object for apt_pkg.AcquireWorker objects.
Check that the object object is an apt_pkg.AcquireWorker object, or a subclass thereof.
Check that the object object is an apt_pkg.AcquireWorker object and no subclass thereof.
Create a new apt_pkg.AcquireWorker object from the pkgAcquire::Worker pointer given by the parameter worker. If the parameter delete is true, the object pointed to by worker will be deleted when the reference count of the returned object reaches 0. The parameter owner should point to a apt_pkg.Acquire object.
The type object for apt_pkg.ActionGroup objects.
Check that the object object is an apt_pkg.ActionGroup object, or a subclass thereof.
Check that the object object is an apt_pkg.ActionGroup object and no subclass thereof.
Create a new apt_pkg.ActionGroup object from the pkgDepCache::ActionGroup pointer given by the parameter agroup. If the parameter delete is true, the object pointed to by agroup will be deleted when the reference count of the returned object reaches 0. The parameter owner should point to a apt_pkg.DepCache object.
The type object for apt_pkg.Cache objects.
Check that the object object is an apt_pkg.Cache object, or a subclass thereof.
Check that the object object is an apt_pkg.Cache object and no subclass thereof.
Create a new apt_pkg.Cache object from the pkgCache pointer given by the parameter cache. If the parameter delete is true, the object pointed to by cache will be deleted when the reference count of the returned object reaches 0. The parameter owner shall point to a object of the type PyCacheFile_Type.
The type object for CacheFile. This type is internal and not exported to Python anywhere.
Check that the object object is of the type PyCacheFile_Type or a subclass thereof.
Check that the object object is of the type PyCacheFile_Type and no subclass thereof.
Create a new apt_pkg.CacheFile object from the pkgCacheFile pointer given by the parameter file If the parameter delete is true, the object pointed to by file will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.Cdrom objects.
Check that the object object is an apt_pkg.Cdrom object, or a subclass thereof.
Check that the object object is an apt_pkg.Cdrom object and no subclass thereof.
Create a new apt_pkg.Cdrom object from the pkgCdrom reference given by the parameter cdrom. If the parameter delete is true, cdrom will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.Configuration objects.
Check that the object object is an apt_pkg.Configuration object, or a subclass thereof.
Check that the object object is an apt_pkg.Configuration object and no subclass thereof.
Create a new apt_pkg.Configuration object from the Configuration pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner may refer to a parent object (e.g. when exposing a sub tree of a configuration object).
The type object for apt_pkg.DepCache objects.
Check that the object object is an apt_pkg.DepCache object, or a subclass thereof.
Check that the object object is an apt_pkg.DepCache object and no subclass thereof.
Create a new apt_pkg.DepCache object from the pkgDepCache pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyCache_Type.
The type object for apt_pkg.Dependency objects.
Check that the object object is an apt_pkg.Dependency object, or a subclass thereof.
Check that the object object is an apt_pkg.Dependency object and no subclass thereof.
Create a new apt_pkg.Dependency object from the pkgCache::DepIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyPackage_Type.
The type object for apt_pkg.Description objects.
Check that the object object is an apt_pkg.Description object, or a subclass thereof.
Check that the object object is an apt_pkg.Description object and no subclass thereof.
Create a new apt_pkg.Description object from the pkgCache::DescIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyPackage_Type.
New in version 0.8.0.
The type object for apt_pkg.Group objects.
Check that the object object is an apt_pkg.Group object, or a subclass thereof.
Check that the object object is an apt_pkg.Group object and no subclass thereof.
Create a new apt_pkg.Group object from the pkgCache::GrpIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner should be a PyObject of the type PyCache_Type.
The type object for apt_pkg.Hashes objects.
Check that the object object is an apt_pkg.Hashes object, or a subclass thereof.
Check that the object object is an apt_pkg.Hashes object and no subclass thereof.
Create a new apt_pkg.Hashes object from the Hashes reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.HashString objects.
Check that the object object is an apt_pkg.HashString object, or a subclass thereof.
Check that the object object is an apt_pkg.HashString object and no subclass thereof.
Create a new apt_pkg.HashString object from the HashString pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.IndexRecords objects.
Check that the object object is an apt_pkg.IndexRecords object, or a subclass thereof.
Check that the object object is an apt_pkg.IndexRecords object and no subclass thereof.
Create a new apt_pkg.IndexRecords object from the indexRecords pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.MetaIndex objects.
Check that the object object is an apt_pkg.MetaIndex object, or a subclass thereof.
Check that the object object is an apt_pkg.MetaIndex object and no subclass thereof.
Create a new apt_pkg.MetaIndex object from the metaIndex pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner should be a PyObject of the type PySourceList_Type.
The type object for apt_pkg.Package objects.
Check that the object object is an apt_pkg.Package object, or a subclass thereof.
Check that the object object is an apt_pkg.Package object and no subclass thereof.
Create a new apt_pkg.Package object from the pkgCache::PkgIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner should be a PyObject of the type PyCache_Type.
The type object for apt_pkg.PackageFile objects.
Check that the object object is an apt_pkg.PackageFile object, or a subclass thereof.
Check that the object object is an apt_pkg.PackageFile object and no subclass thereof.
Create a new apt_pkg.PackageFile object from the pkgCache::PkgFileIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner should be a PyObject of the type PyCache_Type.
The type object for apt_pkg.IndexFile objects.
Check that the object object is an apt_pkg.IndexFile object, or a subclass thereof.
Check that the object object is an apt_pkg.IndexFile object and no subclass thereof.
Create a new apt_pkg.IndexFile object from the pkgIndexFile pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner should be a PyObject of the type PyMetaIndex_Type.
The type object for apt_pkg.OrderList objects.
Check that the object object is an apt_pkg.OrderList object, or a subclass thereof.
Check that the object object is an apt_pkg.OrderList object and no subclass thereof.
Create a new apt_pkg.OrderList object from the pkgOrderList pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The owner must be a apt_pkg.DepCache object.
The type object for apt_pkg.PackageManager objects.
Check that the object object is an apt_pkg.PackageManager object, or a subclass thereof.
Check that the object object is an apt_pkg.PackageManager object and no subclass thereof.
Create a new apt_pkg.PackageManager object from the pkgPackageManager pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.Policy objects.
Check that the object object is an apt_pkg.Policy object, or a subclass thereof.
Check that the object object is an apt_pkg.Policy object and no subclass thereof.
Create a new apt_pkg.Policy object from the pkgPolicy pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyCache_Type.
The type object for apt_pkg.ProblemResolver objects.
Check that the object object is an apt_pkg.ProblemResolver object, or a subclass thereof.
Check that the object object is an apt_pkg.ProblemResolver object and no subclass thereof.
Create a new apt_pkg.ProblemResolver object from the pkgProblemResolver pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyDepCache_Type.
The type object for apt_pkg.SourceList objects.
Check that the object object is an apt_pkg.SourceList object, or a subclass thereof.
Check that the object object is an apt_pkg.SourceList object and no subclass thereof.
Create a new apt_pkg.SourceList object from the pkgSourceList pointer given by the parameter cpp. If the parameter delete is true, the object pointed to by cpp will be deleted when the reference count of the returned object reaches 0.
The type object for apt_pkg.TagFile objects.
Check that the object object is an apt_pkg.TagFile object, or a subclass thereof.
Check that the object object is an apt_pkg.TagFile object and no subclass thereof.
Create a new apt_pkg.TagFile object from the pkgTagFile reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner may be any Python object.
The type object for apt_pkg.TagSection objects.
Check that the object object is an apt_pkg.TagSection object, or a subclass thereof.
Check that the object object is an apt_pkg.TagSection object and no subclass thereof.
Create a new apt_pkg.TagSection object from the pkgTagSection reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner may be a PyObject of the type PyTagFile_Type.
The type object for apt_pkg.Version objects.
Check that the object object is an apt_pkg.Version object, or a subclass thereof.
Check that the object object is an apt_pkg.Version object and no subclass thereof.
Create a new apt_pkg.Version object from the pkgCache::VerIterator reference given by the parameter cpp. If the parameter delete is true, cpp will be deleted when the reference count of the returned object reaches 0. The parameter owner must be a PyObject of the type PyPackage_Type.