Saravanan666/pypi-org huggingface dataset:
Package: databento
databento-pythonThe official Python client library forDatabento.Key features include:Fast, lightweight access to both live and historical data frommultiple markets.Multiple schemassuch as MBO, MBP, top of book, OHLCV, last sale, and more.Fully normalized, i.e. identical message schemas for both live and historical data, across multiple asset classes.Provides mappings between different symbology systems, includingsmart symbologyfor futures rollovers.Point-in-timeinstrument definitions, free of look-ahead bias and retroactive adjustments.Reads and stores market data in an extremely efficient file format usingDatabento Binary Encoding.Event-drivenmarket replay, including at high-frequency order book granularity.Support forbatch downloadof flat files.Support forpandas, CSV, and JSON.DocumentationThe best place to begin is with ourGetting startedguide.You can find our full client API reference on theHistorical ReferenceandLive Referencesections of our documentation. See also theExamplessection for various tutorials and code samples.RequirementsThe library is fully compatible with the latest distribution of Anaconda 3.8 and above.
The minimum dependencies as found in thepyproject.tomlare also listed below:python = "^3.8"aiohttp = "^3.8.3"databento-dbn = "0.15.1"numpy= ">=1.23.5"pandas = ">=1.5.3"pyarrow = ">=13.0.0"requests = ">=2.24.0"zstandard = ">=0.21.0"InstallationTo install the latest stable version of the package from PyPI:pip install -U databentoUsageThe library needs to be configured with an API key from your account.Sign upfor free and you will automatically
receive a set of API keys to start with. Each API key is a 32-character
string starting withdb-, that can be found on the API Keys page of yourDatabento user portal.A simple Databento application looks like this:importdatabentoasdbclient=db.Historical('YOUR_API_KEY')data=client.timeseries.get_range(dataset='GLBX.MDP3',symbols='ES.FUT',stype_in='parent',start='2022-06-10T14:30',end='2022-06-10T14:40',)data.replay(callback=print)# market replay, with `print` as event handlerReplaceYOUR_API_KEYwith an actual API key, then run this program.This uses.replay()to access the entire block of data
and dispatch each data event to an event handler. You can also use.to_df()or.to_ndarray()to cast the data into a PandasDataFrameor numpyndarray:df=data.to_df()# to DataFramearray=data.to_ndarray()# to ndarrayNote that the API key was also passed as a parameter, which isnot recommended for production applications.
Instead, you can leave out this parameter to pass your API key via theDATABENTO_API_KEYenvironment variable:importdatabentoasdb# Pass as parameterclient=db.Historical('YOUR_API_KEY')# Or, pass as `DATABENTO_API_KEY` environment variableclient=db.Historical()LicenseDistributed under theApache 2.0 License.
Package: databento-dbn
databento-dbnPython bindings for thedbnRust library, used by theDatabento Python client library.
For more information about the encoding, read ourintroduction to DBN.Using this library is for advanced users and is not fully documented or supported.InstallationTo install the latest stable version from PyPI:pipinstall-Udatabento-dbnUsage and documentationSee thedocumentationfor the Python client library.Buildingdatabento-dbnis written in Rust, so you'll need to haveRust installedas well asMaturin.To build, run the following commands:gitclonehttps://github.com/databento/dbncddbn
maturinbuildTo build the Python package and install it for the active Python interpreter in yourPATH, run:maturindevelopThis will install a package nameddatabento-dbnin your current Python environment.LicenseDistributed under theApache 2.0 License.
Package: databet
The databetThis repo contains 27 datasets: 26 of these resemble the letters of the alphabet, the 27th is a star:For each of the datasets (to 2 decimal places):The mean of the x-values is 0.50The mean of the y-values is 0.52The standard deviation of the x-values is 0.17The standard deviation of the y-values is 0.18The correlation coefficient is 0.16You can read more about these datasets atmscroggs.co.uk/blog/101.Databet Python packageInstalling with pipIf you want to experiment with these datasets using Python, you can install the databet package
by running:pipinstalldatabetAlternatively, you can install databet directly from this repo by running:pipinstallgit+https://github.com/mscroggs/databetUsing the databet packageOnce you've installed the databet Python package,
you can load a letter or create a plot of a letter using theload_letterandplot_letterfunctions:importdatabeta=databet.load_letter("A")databet.plot_letter("B","b.png")You can also plot words using theplot_wordfunction:importdatabetdatabet.plot_word("DATABET","databet.png")
Package: databind
databindDatabind is a Python serialization library on top of dataclasses, inspired by similar libraries from other languages
likejackson-databindandserde-rs.CORE Guide|JSON ExamplesOverview 📖Thedatabind.corepackage provides the core framework for databind. It is then used bydatabind.jsonto provide
comprehensive serializatio support between Python and JSON-like data structure. The serialization can easily be
extended to YAML or TOML by combining it with respective libraries (e.g.pyaamlandtomli).@dataclassclassServer:host:strport:int@dataclassclassConfig:server:Serverfromdatabind.jsonimportdump,loadassertload({"server":{"host":"localhost","port":8080}},Config)==Config(server=Server(host='localhost',port=8080))assertdump(Config(server=Server(host='localhost',port=8080)),Config)=={"server":{"host":"localhost","port":8080}}If you install thedatabindproxy package, you get matching versions ofdatabind.coreanddatabind.json.Features ✨Support for a plethora of builtin types, includingEnum,Decimal,UUID,Path,datetime,date,time,timedeltaSupport for multiple union serialization modes (nested, flat, keyed,typing.Literal)Support for generic types, e.g.load([{"name": "Jane Doe"}], list[Person])Support for new-style type hints in older Python versions when using forward refererences (strings or__future__.annotations) thanks totypeapiPEP 604 - Allow writing union types as X | YPEP585 - Type Hinting Generics in Standard Collections)Support for customized serialization and deserialization of typesSupport for flattening fields of a nested dataclass or collecting remaining fields in adictFull runtime type checking during serializationUse "settings" to customize serialization behaviourAs global settings perload()/dump()call:load(..., settings=[ExtraKeys(True)])As class-level settings using a decorator:@Union(style=Union.FLAT)or@ExtraKeys(True)As type-hint level settings usingtyping.Annotated(ortyping_extensions.Annotated):full_name: Annotated[str, Alias("fullName")]orFullNameField = Annotated[str, Alias("fullName")]Copyright © 2022 – Niklas Rosenstein
Package: databind2
databindCompatibility: Python 3.6.3+Databind is a library inspired by jackson-databind to de-/serialise Python dataclasses.If you install thedatabindpackage, you will get the respective version of the
following packages:databind.core– Provides the core framework.databind.json– De-/serialize dataclasses to/from JSON payloads.Supported featuresFeaturePython versionDatabind versionPEP5853.91.2.0 –currentPEP585(forward references)3.91.3.1? –currentResolve type parameters of specialised generic types3.x1.5.0 –currenttyping.TypedDict3.x2.0.0 –currentConcretise type variables in parametrised generics3.x2.0.0 –currentCopyright © 2022 – Niklas Rosenstein
Package: databind.binary
databind.binaryDatabind is a library inspired by Jackson-databind to describe and bind data models for
object-oriented programming. Thedatabind.binarypackage implements conversion of data
models between Python and binary format (using thestructmodule).TodoSupport (efficient) unpacking of nested structsQuickstartfromdatabind.binaryimportto_bytes,calc_size,cstr,u32fromdatabind.coreimportdatamodel,field@datamodelclassRiffChunk:""" RIFF-WAVE chunk header. """chunk_id:cstr=field(default=b'RIFF',metadata={'size':4})chunk_size:u32riff_type:cstr=field(default=b'WAVE',metadata={'size':4})assertcalc_size(RiffChunk)==12assertto_bytes(RiffChunk(chunk_size=16442))==b'RIFF:@\x00\x00WAVE'Copyright © 2020 – Niklas Rosenstein
Package: databind-core2
databind.coredatabind.coreprovides a jackson-databind inspired framework for data de-/serialization in Python. Unless you
are looking to implement support for de-/serializing new data formats, thedatabind.corepackage alone might
not be what you are looking for (unless you want to usedatabind.core.dataclassesas a drop-in replacement to
the standard librarydataclassesmodule, for that check out the section at the bottom).Known implementationsdatabind.jsonDataclass extensionThe standard librarydataclassesmodule does not allow to define non-default arguments after default arguments.
You can usedatabind.core.dataclassesas a drop-in replacement to get this feature. It behaves exactly like the
standard library, only that non-default arguments may follow default arguments. Such arguments can be passed to
the constructor as positional or keyword arguments.fromdatabind.coreimportdataclasses@dataclasses.dataclassclassA:value1:int=42@dataclasses.dataclassclassB(A):value2:strprint(B(0,'Hello, World!'))print(B(value2='Answer to the universe'))Copyright © 2020 – Niklas Rosenstein
Package: databind.json
databind.jsonThedatabind.jsonpackage implements the de-/serialization to or from JSON payloads using
thedatabind.coreframework.Check out theDocumentationfor examples.Built-in convertersThe following tables shows which types can be deserialized from / serialize to Python types with the native
converters provided by thedatabind.jsonmodule:Converter nameTypesDescriptionAnyConvertertyping.AnyAccept any value (useful for arbitrary JSON).CollectionConvertertyping.Collection[T], excl.str,bytes,bytearray,memoryviewandtyping.Mapping[K, V]Converts between native Python collections and JSON arrays.DatetimeConverterdatetime.date,datetime.datetime,datetime.timeConverts between strings and date/time formats, using ISO 8601 time format by default (can be changed with thedatabind.core.settings.DateFormatsetting).DecimalConverterdecimal.DecimalConverts between strings (and ints/floats if strict mode is off, strict mode is on by default) and decimals. The precision can be controlled with thedatabind.core.settings.Precisionsetting.EnumConverterenum.Enum,enum.IntEnumConvert between strings and Python enumerations. The serialized form ofIntEnumis the integer value, whereas the serialized form ofEnumis a string (name of the enumeration value).MappingConvertertyping.Mapping[K, V]Converts between Python dicts and JSON objects. (While in theoryKcan be any type, for JSONKalways needs to bestr).OptionalConvertertyping.Optional[T]Handles optional fields in a schema.PlainDatatypeConverterbytes,str,int,float,boolConverts between plain datatypes. In non-strict mode (off by default), numeric types will also accept strings as input for the deserialization.SchemaConverterdataclasses.dataclass,typing.TypedDictConverts between Python dataclasses or typed dictionary and JSON objects.UnionConvertertyping.Union[...]Handles union types. Unions in JSON can be expressed in a multitide of ways, e.g. using a discriminator key and flat, keyed or nested structure or "best match". Check out the examples section of the documentation for more information.LiteralConvertertyping.Literal[...]Accepts or rejects a value based on whether it matches one of the values in the literal type hint.The following converters are provided for convenience:Converter nameTypesDescriptionStringifyConvertern/aA helper that allows to easily create de/serializers from a "to string" and "from string" function.The following additional types are natively supported bydatabind.jsonusingStringifyConverter:TypesDescriptionuuid.UUIDConvert between strings and UUIDs.pathlib.PathConvert between strings and paths.pathlib.PurePathConvert between strings and paths.nr.date.durationDeserialize from ISO 8601 duration strings or the object form, serialize to ISO 8601 strings.Copyright © 2020 – Niklas Rosenstein
Package: databind-json2
databind.jsonThedatabind.jsonpackage implements the de-/serialization to or from JSON payloads using
thedatabind.coreframework.Check out theDocumentationfor examples.Built-in convertersThe following tables shows which types can be deserialized from / serialize to Python types with the native
converters provided by thedatabind.jsonmodule:Converter nameTypesDescriptionAnyConvertertyping.AnyAccept any value (useful for arbitrary JSON).CollectionConvertertyping.Collection[T], excl.str,bytes,bytearray,memoryviewandtyping.Mapping[K, V]Converts between native Python collections and JSON arrays.DatetimeConverterdatetime.date,datetime.datetime,datetime.timeConverts between strings and date/time formats, using ISO 8601 time format by default (can be changed with thedatabind.core.settings.DateFormatsetting).DecimalConverterdecimal.DecimalConverts between strings (and ints/floats if strict mode is off, strict mode is on by default) and decimals. The precision can be controlled with thedatabind.core.settings.Precisionsetting.EnumConverterenum.Enum,enum.IntEnumConvert between strings and Python enumerations. The serialized form ofIntEnumis the integer value, whereas the serialized form ofEnumis a string (name of the enumeration value).MappingConvertertyping.Mapping[K, V]Converts between Python dicts and JSON objects. (While in theoryKcan be any type, for JSONKalways needs to bestr).OptionalConvertertyping.Optional[T]Handles optional fields in a schema.PlainDatatypeConverterbytes,str,int,float,boolConverts between plain datatypes. In non-strict mode (off by default), numeric types will also accept strings as input for the deserialization.SchemaConverterdataclasses.dataclass,typing.TypedDictConverts between Python dataclasses or typed dictionary and JSON objects.UnionConvertertyping.Union[...]Handles union types. Unions in JSON can be expressed in a multitide of ways, e.g. using a discriminator key and flat, keyed or nested structure or "best match". Check out the examples section of the documentation for more information.LiteralConvertertyping.Literal[...]Accepts or rejects a value based on whether it matches one of the values in the literal type hint.The following converters are provided for convenience:Converter nameTypesDescriptionStringifyConvertern/aA helper that allows to easily create de/serializers from a "to string" and "from string" function.The following additional types are natively supported bydatabind.jsonusingStringifyConverter:TypesDescriptionuuid.UUIDConvert between strings and UUIDs.pathlib.PathConvert between strings and paths.pathlib.PurePathConvert between strings and paths.nr.date.durationDeserialize from ISO 8601 duration strings or the object form, serialize to ISO 8601 strings.Copyright © 2020 – Niklas Rosenstein
Package: databind.mypy
databind.mypyMyPy plugin for static type validation when using thedatabind.corepackage.TodoAssignments usingfield()on@datamodels is not yet recognized as valid by MypyPR Mypy to makemypy.plugins.dataclassescustomizable for this use caseGetting startedInstall thedatabind.mypypackage from PyPI and register it as a MyPy plugin.# mypy.ini[mypy]plugins=databind.mypyCopyright © 2020 Niklas Rosenstein
Package: databind.tagline
databind.taglineDatabind is a library inspired by Jackson-databind to describe and bind data models for
object-oriented programming. Thedatabind.taglinemodule provides functionality to (de-)
serialize strings of comma-separated key-value pairs.SyntaxAn object is defined of a comma-separated sequence of key-value pairsAn array is defined as a sequence of valuesKey-value pairs or values can be grouped/nested with surrounding bracesUnions can be instantiated by prefixing a brace with the union member nameNotationSyntaxJSON representationObjecta=b,c=d{"a": "b", "c": "d"}Arraya,b,c["a", "b", "c"]Uniona{b=c}{"type": "a", "a": {"b": "c"}}Nestinga={b=c}{"a": {"b": "c"}}Nestinga,{b=c},d["a", {"b": "c"}, "d"]Quickstartfromdatabind.coreimportdatamodel,field,uniontypefromdatabind.taglineimportfrom_str@datamodelclassBindMount:src:strdst:strread_only:bool=field(altname='readonly',default=False)@uniontype({'bind':BindMount}flat=False)classMount:passassertfrom_str(Mount,'bind{src=data/,dst=/opt/data}')==BindMount('data/','/opt/data')assertfrom_str(Mount,'type=bind,bind={src=data/,dst=/opt/data}')==BindMount('data/','/opt/data')assertfrom_str(BindMount,'src=data/,dst=/opt/data,readonly=true')==BindMount('data/','/opt/data')NotesAll values are loaded as strings. It is up to the user of theload()function to interpret
the values as needed. Thedump()function converts numbers to string for convenience.The union syntax is loaded into nested form, which requires that@uniontype()are configured
withflat=False.The actual data binding is out-sourced with thedatabind.jsonmodule (using a custom registry
initialized with non-strict JSON converters, seedatabind.tagline:registry).The loader/dumper does not currently support escaping control characters. Dumping a string
that contains a control character (like{or,) will result in output that cannot be
parsed.Copyright © 2020 Niklas Rosenstein
Package: databind.yaml
databind.yamlDatabind is a library inspired by Jackson-databind to describe and bind data models for
object-oriented programming. Thedatabind.yamlmodule provides functionality to (de-)
serialize YAML payloads from/to Python objects.Note:This module is just a thin wrapper that provides utility functions, combining the
functionality ofdatabind.jsonwith PyYAML.QuickstartfromtypingimportOptionalfromdatabind.coreimportdatamodelfromdatabind.yamlimportfrom_str@datamodelclassGeolocation:latitude:floatlongitude:floataltitude:Optional[float]=None@datamodelclassResolvedLocation:query:strlocation:Geolocationlondon=from_str(ResolvedLocation,'''query: Londonlocation:latitude: 51.507351longitude: -0.127758''')assertlondon==ResolvedLocation("London",Geolocation(51.507351,-0.127758))Copyright © 2020 Niklas Rosenstein
Package: databird-driver-climate
databird-driver-climateData sources for climate and atmospheric research:climate.EcmwfDriver: Retrieve data from the European Centre for Medium-Range Weather Forecasts (ECMWF) via their APIclimate.C3SDriver: Retrieve data from the Copernicus Climate Change Service (C3S) via their APIclimate.GesDiscDriver: Retrieve data from the NASA EarthData GES DISC service.See also:databirdInstallationpip install databird-driver-climateExample configThe following configuration file uses all the drivers that are provided by this package.general:root:/tmp/databirdprofiles:c3s:driver:climate.C3SDriverconfiguration:key:1234:aabbcc-ddeeff-1234abcdefgecmwf:driver:climate.EcmwfDriverconfiguration:key:env:$ECMWF_API_KEYemail:"someone@example.com"gesdisc:driver:climate.GesDiscDriverconfiguration:login:username_xxxpassword:password_xxxrepositories:era5:description:ERA5 dataprofile:c3speriod:1 daydelay:177 daysstart:2019-02-01queue:slowtargets:grib2:"{time:%Y}/era5_europe_{time:%Y%m%d}_00.grib"configuration:name:reanalysis-era5-completerequest:dataset:era5class:eatype:anstream:operexpver:1levtype:mllevelist:71param:131area:70/-130/30/-60grid:2/2date:"{time:%Y-%m-%d}"time:"{time:%H}"ecmwf/oper:description:ECMWF operationalprofile:ecmwfperiod:1 daysdelay:3 daysstart:2019-08-01queue:slowtargets:grib2:"{time:%Y}/ecmwf_oper_{time:%Y%m%d}.grib"configuration:mars:class:ODtype:ANstream:OPERexpver:1grid:1.125/1.125area:90/-180/80/100levtype:MLlevelist:ALLparam:T/U/Vdate:"{time:%Y-%m-%d}"time:00/06/12/18use:INFREQUENTformat:GRIB2merra:description:MERRA-2profile:gesdiscperiod:1 daysdelay:180 daysstart:2019-02-01queue:slowtargets:default:"{time:%Y}/merra_{time:%Y-%m-%d}.nc"configuration:url:https://goldsmr5.gesdisc.eosdis.nasa.gov:443/opendap/MERRA2/M2I3NPASM.5.12.4/{time:%Y}/{time:%m}/MERRA2_400.inst3_3d_asm_Np.{time:%Y%m%d}.nc4variables:[U,T,V]subset:lat:"20:1:30"lon:"10:1:20"lev:"10:"
Package: databooks
databooksis a package to ease the collaboration between data scientists usingJupyter notebooks, by reducing the number of git conflicts between
different notebooks and resolution of git conflicts when encountered.The key features include:CLI toolClear notebook metadataResolve git conflictsSimple to useSimple API for using modelling and comparing notebooks usingPydanticRequirementsdatabooksis built on top of:Python 3.7+TyperRichPydanticGitPythonTomliInstallationpip install databooksUsageClear metadataSimply specify the paths for notebook files to remove metadata. By doing so, we can
already avoid many of the conflicts.$databooksmeta[OPTIONS]PATHS...Fix git conflicts for notebooksSpecify the paths for notebook files with conflicts to be fixed. Then,databooksfinds
the source notebooks that caused the conflicts and compares them (so no JSON manipulation!)$databooksfix[OPTIONS]PATHS...Assert notebook metadataSpecify paths of notebooks to be checked, an expression or recipe of what you'd like to
enforce.databookswill run your checks and raise errors if any notebook does not
comply with the desired metadata values. This advanced feature allows users to enforce
cell tags, sequential cell execution, maximum number of cells, among many other things!Check out ourdocsfor more!$databooksassert[OPTIONS]PATHS...Show rich notebookInstead of launching Jupyter and opening the browser to inspect notebooks, have a quick
look at them in the terminal. All you need is to specify the path(s) of the notebook(s).$databooksshow[OPTIONS]PATHS...Show rich notebook diffsSimilar to git diff, but for notebooks! Show a rich diff of the notebooks in the
terminal. Works for comparing git index with the current working directory, comparing
branches or blobs.$databooksdiff[OPTIONS][REF_BASE][REF_REMOTE][PATHS]...LicenseThis project is licensed under the terms of the MIT license.
Package: data-box
This project is to clean factor data and to prepare for back test.Dependenciespython 3.5pandas 0.22.0numpy 1.14.3picklesklearn 0.19.1 (for pca only)Examplefromdata_boximportdata_boxdb=data_box()\.set_lag(freq='d',day_lag=0)\.load_adjPrice(price)\# 'price' is a pd.DataFrame with dates(20190101 int type) as its index and tickers as its column.load_indestry(ind)\.load_suspend(sus)\.load_indexWeight(index_weight)\.calc_indweight()\# calculate industry weight based on index weight and stocks' industry in this index.load_cap(cap)\.add_factor('f1',factor1)\.add_factor('f2',factor2)\.add_factor('f3',factor3)\.align_data()\.factor_pca()\.factor_ind_neutral()\.factor_size_neutral()\.factor_zscore()print(db.Factor)print(db.Price)print(db.Sus)print(db.Cap)# save and reloaddb.save(path)db2=databox().load(path)
Package: databricks-api-utils
Databricks API UtilitiesHelper functions for working with the Databricks APIFree software: MIT licenseDocumentation:https://databricks-api-utils.readthedocs.io.FeaturesImport/Export a folder of files to/from Databricks in source format. Rather than only being able to import/export in binary DBC format.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-11-05)First release on PyPI.