Saravanan666/pypi-org huggingface dataset:
Package: drb-driver-wxs
WXS driverThis drb-driver-wxs module implements the OWS services (WFS, WMS, WCS, ...).
For more information about OWS Service seehttps://www.ogc.org/or/andhttps://www.ogc.org/standards/wmsOGC catalog, this driver is abstract, it means that to have a usable
OWS service driver, we have to create a driver for this service
dependent on this abstract driver.
Sot have a signature, its derived drivers will have to define oneNodesWXSServiceNodeAbstract, have to be derived.
Represents the WXS service (like WMS, WCS, ...). This node has no attribute and
has as children request (like GetMap) WXsOperationNode and other children that
define the Service as XmlNodeWXSNodeOperationRepresents an operation than can be used on the service.Installationpip install drb-driver-wxsUsagesTo implement an OWS Web Service, we have to create a class based on WXSServiceNode
and define at least the read_capabilities method.classWmsServiceNode(WXSServiceNode):...defread_capabilities(self,node_capabilities):....After we can use this node like other DRB Node
The operation of service are available across the children of the node service,
See drb.drivers.wms or drb.drivers.wcs for more information.Example with a drb.drivers.wms driverurl_wms='https+wms://wms.fr/geoserver/demo/wms?'# The service use a specialservice_wms=WmsServiceNode(url_wms)dict_request={'layers':'mgrs_region','format':'image/png','height':256,'width':256,'crs':'EPSG:3857','bbox':'7514065.628545968,7514065.628545967,10018754.171394622,10018754.171394628'}get_map=service_wms['GetMap'][dict_request]print('----------------------------------------')print('GetMap : with parameter return image')print(get_map)# => return an drb image# url of request# https://wms.fr/geoserver/demo/wms?# &service=WMS&# request=GetMap&# layers=mgrs_region&# format=image%2Fpng&# crs=EPSG%3A3857&# bbox=7514065.628545968,7514065.628545967,10018754.171394622,10018754.171394628Example with a drb.drivers.wcs driverurl_wcs='https+wcs://wcs/mapserv'# The service use a specialservice_wcs=WcsServiceNode(url_wcs,auth=None,map='/map/nitrogen.map')# SUBSET is use twice with two values, we use a list to in dictdict_request={'COVERAGEID':'nitrogen_5-15cm_Q0.5','VERSION':'2.0.1','SUBSET':['X(-1784000,-1140000)','Y(1356000,1863000)'],'FORMAT':'GEOTIFF_INT16','SUBSETTINGCRS':'http://www.opengis.net/def/crs/EPSG/0/152160','OUTPUTCRS':'http://www.opengis.net/def/crs/EPSG/0/152160'}get_map=service_wcs['GetCoverage'][dict_request]# url of request# https://wcs/mapserv?# map=%2Fmap%2Fnitrogen.map&# SERVICE=WCS&VERSION=2.0.1&# REQUEST=GetCoverage&# COVERAGEID=nitrogen_5-15cm_Q0.5&# FORMAT=GEOTIFF_INT16&# SUBSET=X(-1784000%2C-1140000)&SUBSET=Y(1356000%2C1863000)&# SUBSETTINGCRS=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F152160&# OUTPUTCRS=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F152160# => return the image
Package: drb-driver-xml
XmlNode ImplementationThis drb-driver-xml module implements xml format access with DRB data model. It
is able to navigates among the xml contents.Xml Factory and Xml NodeThe module implements the basic factory model defined in DRB in its node
resolver. Based on the python entry point mechanism, this module can be
dynamically imported into applications.The entry point group reference isdrb.driver.The driver name isxml.The factory classXmlNodeFactoryis encoded intodrb.drivers.factorymodule.The xml factory creates a XmlNode from an existing xml content. It uses a base
node to access the content data using the streamed base node implementation.The base node can be a FileNode (See drb-driver-file), HttpNode, ZipNode or any
other node able to provide streamed (BufferedIOBase,RawIOBase,IO) xml
content.limitationsThe current version does not manage child modification and insertion. XmlNode
is currently read only.Using this moduleTo include this module into your project, thedrb-driver-xmlmodule shall be
referenced intorequirement.txtfile, or the following pip line can be run:pip install drb-driver-xml
Package: drb-driver-yaml
YamlNode ImplementationThisdrb-driver-yamlmodule implements yaml format access with DRB data
model. It is able to navigates among the yaml contents.Yaml Factory and Yaml NodeThe module implements the basic factory model defined in DRB in its node
resolver. Based on the python entry point mechanism, this module can be
dynamically imported into applications.The entry point group reference isdrb.driver.The implementation name isyaml.The factory class is encoded intodrb.drivers.yaml:YamlNodeFactory.The yaml factory creates a YamlNode from an existing yaml content. It uses a
base node to access the content data using the streamed base node
implementation.The base node can be a FileNode (See drb-driver-file), HttpNode, ZipNode or
any other node able to provide streamed (BufferedIOBase,RawIOBase,IO)
yaml content.limitationsThe current version does not manage child modification and insertion. yamlNode
is currently read only.Using this moduleTo include this module into your project, thedrb-driver-yamlmodule shall be
referenced intorequirement.txtfile, or the following pip line can be run:pip install drb-driver-yamlNode Creation:The implementation can create a yamlNode by giving the path to a yaml file:from drb.driver.yaml import YamlNode

node = YamlNode(PATH_yaml)If the baseNode is an HttpNode, FileNode... the implementation can retrieve the data of your yaml with this:from drb.drivers.yaml import YamlNodeFactory

FACTORY = YamlNodeFactory()
FILE_NODE = DrbFileNode(PATH_TO_YOUR_YAML)
NODE = FACTORY.create(FILE_NODE)DocumentationThe documentation of this implementation can be found herehttps://drb-python.gitlab.io/impl/yaml
Package: drb-driver-zarr
ZarrNode DriverThis drb-driver-zarr module implements access to zarr containers with DRB data model. It is able to navigates among the zarr contents.Zar Factory and Zarr NodeThe module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.driver.The driver name iszarr.The factory class is decribed with implementationdrb.drivers.zarr.zarr_node_factory.The zarr factory creates a ZarrNode from an existing zarr content. It uses a base node to access the content data using a streamed implementation from the base node.The base node can be a DrbFileNode, DrbHttpNode, DrbTarNode or any other nodes able to provide streamed (BufferedIOBase,RawIOBase,IO) zarr content.limitationsThe current version does not manage child modification and insertion. ZarrNode is currently read only.Using this moduleTo include this module into your project, thedrb-driver-zarrmodule shall be referenced intorequirements.txtfile, or the following pip line can be run:pip install drb-driver-zarr
Package: drb-driver-zip
ZipNode DriverThis drb-driver-zip module implements access to zip containers with DRB data model. It is able to navigates among the zip contents.Zip Factory and Zip NodeThe module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.drivers.The implementation name iszip.The factory class is encoded intodrb.drivers.zip.The zip factory creates a ZipNode from an existing zip content. It uses a base node to access the content data using a streamed implementation from the base node.The base node can be a DrbFileNode, DrbHttpNode, DrbTarNode or any other nodes able to provide streamed (BufferedIOBase,RawIOBase,IO) zip content.limitationsThe current version does not manage child modification and insertion. ZipNode is currently read only.Using this moduleTo include this module into your project, thedrb-driver-zipmodule shall be referenced intorequirements.txtfile, or the following pip line can be run:pip install drb-driver-zip
Package: drb-extractor
DRB ExtractorExtractorAn extractor as its name suggests allowing to extract information/data from
a node. An extractor is defined by a YAML content. Three extractor types exists
currently:ConstantThis extractor nothing from the node but give always the same value.constant:42Some string values are automatically converted to a specific Python type:ValuePython type2022-01-01datatime.date2022-01-01T00:00:00.000Zdatatime.datetimeXQueryThis extractor allowing to extract data from the node via an XQuery script.
See more details aboutXQuery.xquery:|data(./manifest.safe/XFDU/metadataSection/metadataObject[@ID="generalProductInformation"]/metadataWrap/xmlData/*[matches(name(),"standAloneProductInformation|generalProductInformation")]/noiseCompressionType)PythonThe Python extractor allowing to extract data from a node via a Python script.
Where thenodevariable represents the current node.python:|return node['DATASTRIP'][0]['MTD_DS.xml']['Level-1C_DataStrip_ID']['General_Info']['Datatake_Info'].get_attribute('datatakeIdentifier')ScriptThe Script extractor allowing to extract data from a node via a Python method.
A DrbNode given in argument of the extract method will be put in argument.script:package.module:function1# execute complex python script to generate the previewexample:drbItemClass:aff2191f-5b06-4121-a9fa-f3d93f6c6331variables:-name:node_platformxquery:|./manifest.safe/XFDU/metadataSection/metadataObject[@ID="platform"]/metadataWrap/xmlData/platformmetadata:-name:'platformName'constant:'Sentinel-1'-name:'SatelliteNumber'xquery:|declare variable $node_platform external;data($node_platform/number)-name:'platformIdentifier'python:|return node_platform['nssdcIdentifier'].value-name:'resolutionDetail'python:|resolution = node.name[10:11]if resolution == 'F':return 'Full'elif resolution == 'H':return 'High'elif resolution == 'M':return 'Medium'return None-name:'index_340_380'script:package.module:function1
Package: drb-fuse
Drb Fuse RepresentationThis drb-fuse module implements a representation of DrbNode as a field system. It is able to navigates among the DrbNode
contents.FsNodeFsNode is the node that implement the Fuse representation of a node.An example that represent a xml node from the file test.xml on directory /tmp/hello/:Create a FsNode with argument 'node' and 'mountpoint'
And after  sets up a fuse file system that represent the node.
The directory pointed by 'mountpoint' must existfrommultiprocessingimportProcessfromdrb.drivers.fileimportDrbFileFactoryfromdrb.fuseimportFsNodexml_file="files"/"test.xml"node_file=DrbFileFactory().create(xml_file)fsnode=FsNode(node_file,'/tmp/hello/')process_fs=Process(target=fsnode.run_fs(),kwargs={'node':node,'mountpoint':'/tmp/hello/'}Same example with functions start_fs:
The function start_fs create the directory if the directory not exists
And create an instance of FsNode with  'node' and 'mountpoint'
and launch the method 'run_fs()' from the instance of FsNodefrommultiprocessingimportProcessfromdrb.drivers.fileimportDrbFileFactoryfromdrb.fuseimportFsNodefromdrb.fuse.drb_fuse3importstart_fsxml_file="files"/"test.xml"node_file=DrbFileFactory().create(xml_file)process_fs=Process(target=start_fs,kwargs={'node':node,'mountpoint':'/tmp/hello/'}Using this moduleTo include this module into your project, thedrb-fusemodule shall be referenced intorequirement.txtfile, or
the following pip line can be run:pip install drb-fuseThe fuse3 library have to be installedFor ubuntu the following command line can be run:sudo apt install fuse3 libfuse3-dev
Package: drb-image
DRB Image ExtractorIt's an applicative part using DRB allowing to extract image from
data according its topic.PackagingThe package python containing an addon image of a DRB topic must have the following
instruction:adrb.addon.imageentry point whose its value is the targeted Python
package containing thecortex.yamlfileHow to define an addon image ?Addon Image are defined in acortex.yamlfile following the template:topic:<topic_uuid># target topicimage:# image is an array of object with a name, a source and auxiliaries data-name:<extractor>:<extractor_content># An extrator for the images namesource:<extractor>:<extractor_content># An extractor the images itselfaux_data:# Auxiliaries data are optional<aux_data1>:value1<aux_data2>:value2### How to extract an image ?For the following addon description.```yamltopic:b0dad6fa-9ae4-4694-b00b-449cd456d32a# Sentinel-1A Interferometric Wide Swath Level 1 S Productimage:-name:constant:quicklooksource:xquery:|/preview/quick-look.png-name:constant:thumbnailsource:xquery:/thumbnail.pngThe different image node can be extract with this:fromdrb.image.coreimportImageAddonimportdrb.topics.resolverasresolverif__name__=='__main__':node=resolver.create('S1A_IW_RAW__0SDH_20220201T101715_20220201T101734_041718_04F6C6_A26E.SAFE')# Retrieve the first addon image object corresponding to the product# here, the quicklook imageimage=ImageAddon().apply(node)# Retrieve the addon image object corresponding to the image nameimage=ImageAddon().apply(node=node,image_name='thumbnail')# Retrieve the addon image object corresponding to the image_name and resolution given in argumentimage=ImageAddon().apply(node=node,image_name='quickLook',resolution='10m')# This will raise an DrbException because it can't find any image addonimage=ImageAddon().apply(node=node,image_name='Non_existing_image')# To retrieve the DrbNode corresponding to the image, use:image_node=image.image_node()If a topic defines more than one image, and image_name is not specified, ImageAddon().apply() return the first image declared in the topic. If the topic of the node is not found in the cortex file, it will also check all the topic's parents recursively.ExtractorAll the information about extractor can be foundhere
Package: drb-image-sentinel2
DRB Sentinel-2 Image AddOnThis addon enrich theSentinel-2 Producttopics with a preview image extractor.Available ImagesProductImage namePathLevel-1CpreviewGRANULE//QI_DATA/_PVI.jp2Level-1CTrueColorImageGRANULE//IMG_DATA/_TCI*.jp2Level-1C{band_name}]GRANULE/*/IMG_DATA/{band_name}Level-2ApreviewGRANULE//QI_DATA/_PVI.jp2Level-2ATrueColorImageGRANULE//IMG_DATA/_TCI*.jp2Level-2A{band_name}GRANULE//IMG_DATA//{band_name}{band_name} correspond to the name of the actual .jp2 fileExamplezip_node=resolver.create('/path/to/sentinel2.zip')safe_node=zip_node[0]# Retrieve the addon image object corresponding to the product (preview by default)image=AddonImage.apply(safe_node)# The image name can be specifiedimage=AddonImage.apply(safe_node,image_name='preview')# Retrieve the drb-driver-image node corresponding to the addon using the default extractionaddon_image_node=image.image_node()# Retrieve the rasterio implementation of the default imagedataset=image.get_impl(rasterio.DatasetReader)
Package: drb-impl-file
FileNode ImplementationThis drb-impl-file module implements file protocol access with DRB data model. It is able to navigates among the file systems.File Factory and File NodeThe module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.impl.The implementation name isfile.The factory class is encoded intodrb_impl_file.drb_impl_file.The file factory creates a FileNode from an existing path only, otherwise, aDrbFileNodeFactoryExceptionexception is raised.The FileNode can be instantiated from a single path or an uri. ThePathclass and its subclassesParsedPathprovided in drb core module can help to manage these inputs.limitationsThe current version does not manage child modification and insertion.Using this moduleTo include this module into your project, thedrb-impl-filemodule shall be referenced intorequirement.txtfile, or the following pip line can be run:pip install drb-impl-file
Package: drb-impl-ftp
Ftp ImplementationThis drb-impl-ftp module implements ftp protocol access with DRB data model.Ftp Factory and Ftp NodeThe module implements the factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.impl.The implementation name isftp.The factory class is encoded intodrb_impl_ftp.drb_impl_ftp.The ftp signature id isd61c923a-5f1b-11ec-bf63-0242ac130002The Ftp can be instantiated from an uri. TheParsedPathclass provided in drb core module can help to manage these inputs.Using this moduleThe project is present inhttps://www.pypi.orgservice. it can be freely
loaded into projects with the following command line:pip install drb-impl-ftpAccess DataDrbFtpNodemanages the ftp protocol to access remote data. The construction
parameter is an url with the host and an authentication object. Both FTP and FTPS are supported. They allow access the
ftp content.fromdrb_impl_ftpimportDrbFtpNodefromdrb_impl_ftpimportBasicAuthnode=DrbFtpNode("URL","HOST",auth=BasicAuth("username","password"))Ftp protocol allows navigation inside the ftp server. To do so this
implementation is able to provide children of the same FTP type.AuthenticationFTP node is able to manage Basic authentication based on username and
password, as well as TLS ans SSL authentication by using theFTP_TLS.auth().This method set up a secure control connection.
By default, the node will try to connect with the SSL protocol if you want to change protocol you have to give
You can find all the version of TLS and SSL supported herehttps://docs.python.org/3/library/ftplib.html#ftplib.FTP_TLS.ssl_versionLimitationsNoneDocumentationThe documentation of this implementation can be found herehttps://drb-python.gitlab.io/impl/ftp
Package: drb-impl-http
Http & Https ImplementationThis drb-impl-http module implements http and https protocol access with DRB data model.Http Factory and Http NodeThe module implements the factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.impl.The implementation name ishttp.The factory class is encoded intodrb_impl_http.drb_impl_http.The http signature id isb065a5aa-35a3-11ec-8d3d-0242ac130003The https signature id isc18ef57c-3673-11ec-8d3d-0242ac130003The HttpNode can be instantiated from an uri. TheParsedPathclass provided in drb core module can help to manage these inputs.Using this moduleThe project is present inhttps://www.pypi.orgservice. it can be freely
loaded into projects with the following command line:pip install drb-impl-httpAccess DataDrbHttpNodemanages the http protocol to access remote data. The construction
parameter is an url. Both http and https are supported. They allow access the
http content en header. The content is accessible withvaluenode class
attribute. It shall also be possible to retrieve specific streamed
implementation usingget_implmethode.
The URL HTTP GET response header of the given URL is accessible viaattributesof the node.fromdrb_impl_httpimportDrbHttpNodenode=DrbHttpNode('https://gitlab.com/drb-python/impl/http/-/raw/main/README.md')print(node.name)print(node.attributes)print(node.path)print(node.value)HTTP protocol does not allow navigation inside http path so this
implementation is not able to provide any children of the same HTTP type.AuthenticationHttp node is able to manage Basic authentication based on username and
password, as well as OAuth2.0 authentication based on token.
It should also support Digest authentication via requests packageHTTPDigestAuthimplementation.Basic AuthTo implements Basic authentication connection, theHTTPBasicAuthclass
from requests package is used.fromrequests.authimportHTTPBasicAuthfromdrb_impl_httpimportDrbHttpNodeauth=HTTPBasicAuth('username','password')node=DrbHttpNode('https://www.gael.fr',auth=auth)OAuth2.0 connectionA dedicatedHTTPOAuth2class is available to manage OAuth2.0 authentication.
It allows token retrieval and refresh when expired.fromdrb_impl_httpimportDrbHttpNode,HTTPOAuth2svc_url='https://www.gael-systems.com/service'token_svc='https://auth.gael-systems.com/token'user='user'password='pass'service_id='service'secret='secret'auth=HTTPOAuth2(username=user,password=password,token_url=token_svc,client_id=service_id,client_secret=secret)node=DrbHttpNode(svc_url,auth=auth)The renewal event of the token is triggered by computation. Based on the
token expiration delay, the implementation computes the period to create or
refresh a new token. Thanks to this mechanism, no unnecessary connection
is performed by the client for this stage.LimitationsNoneDocumentationThe documentation of this implementation can be found herehttps://drb-python.gitlab.io/impl/http
Package: drb-impl-image
ImageNode ImplementationThis drb-impl-image module implements images data formats to be accessed with DRB data model. It is able to navigates among the images contents and accessing the image data.Supported images formatsThe current implementation is based on RasterIO module. It has been tested with Tiff/GeoTIFF, Jp2k and png formats.There are no limitations to use other formats supported by rasterio, seehttps://gdal.org/drivers/raster/index.htmlfor details.Image Factory and Image NodeThe module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.impl.The implementation name isimage.The factory class is encoded intodrb_impl_image.image_node_factory.The image factory creates an ImageNode from an existing image data. It uses a base node to access the content data with the streamed base node implementation.The base node can be a FileNode (See drb-impl-file), HttpNode, ZipNode or any other node able to provide streamed (BufferedIOBase,RawIOBase,IO) xml content.limitationsThe current version does not manage child modification and insertion. ImageNode is currently read only.Using this moduleTo include this module into your project, thedrb-impl-imagemodule shall be referenced intorequirement.txtfile, or the following pip line can be run:pip install drb-impl-image
Package: drb-impl-java
JavaNode ImplementationThe drb-impl-java python module aims to wrap Java version of DRB model. It is able to navigates among java nodes content.Seedocumentationfor details.Library usageJava must be present in the systemNormally if java is correctly installed, theJAVA_HOMEenvironmentvariableis set
You can check it by command line belowecho $JAVA_HOMEInstalling this library with execute the following in a terminalpip install jip
pip install drb-impl-javaIf you want add schema or addon you have eventuallyCLASSPATH_ADDONto defineexport CLASSPATH_ADDON=/path_addon_one/*;Java Factory and Java NodeThe module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.The entry point group reference isdrb.impl.The implementation name isjava.The factory class is encoded intodrb_impl_java.drb_impl_signature.The java factory creates a JavaNode from an existing java content. It uses a base node to access the content data using a streamed implementation from the base node.The base node can be a DrbFileNode, DrbHttpNode, DrbTarNode or any other nodes able to provide streamed (BufferedIOBase,RawIOBase,IO) java content.limitationsThe current version does not manage child modification and insertion. JavaNode is currently read only.Using this moduleTo include this module into your project, thedrb-impl-javamodule shall be referenced intorequirements.txtfile, or the following pip line can be run:pip install jip
pip install drb-impl-javaSet eventually environment variableCLASSPATH_ADDONandJAVA_HOME