Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

databento

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

databento - npm Package Compare versions

Comparing version
0.67.0
to
0.68.0
+5
-4
databento/common/dbnstore.py

@@ -63,2 +63,3 @@ from __future__ import annotations

from databento.common.validation import validate_maybe_enum
from databento.common.validation import validate_path

@@ -142,3 +143,3 @@

The size of the data in bytes; equal to the file size.
path : PathLike[str] or str
path : Path
The path of the file.

@@ -150,4 +151,4 @@ reader : IO[bytes]

def __init__(self, source: PathLike[str] | str):
self._path = Path(source)
def __init__(self, source: Path):
self._path = source

@@ -659,3 +660,3 @@ if not self._path.is_file() or not self._path.exists():

"""
return cls(FileDataSource(path))
return cls(FileDataSource(validate_path(path, "path")))

@@ -662,0 +663,0 @@ @classmethod

@@ -26,2 +26,3 @@ from __future__ import annotations

from databento.common.parsing import datetime_to_unix_nanoseconds
from databento.common.validation import validate_path

@@ -53,3 +54,3 @@

) -> tuple[Path, Path]:
in_file_valid = Path(in_file)
in_file_valid = validate_path(in_file, "in_file")

@@ -62,3 +63,3 @@ if not in_file_valid.exists():

if out_file is not None:
out_file_valid = Path(out_file)
out_file_valid = validate_path(out_file, "out_file")
else:

@@ -65,0 +66,0 @@ out_file_valid = in_file_valid.with_name(

import datetime as dt
import logging
import pathlib
import warnings

@@ -16,2 +15,3 @@ from collections.abc import Callable

from databento.common.error import BentoWarning
from databento.common.validation import validate_file_write_path

@@ -114,3 +114,3 @@

if isinstance(stream, (str, PathLike)):
stream = pathlib.Path(stream).open("xb")
stream = validate_file_write_path(stream, "stream", False).open("xb")
is_managed = True

@@ -117,0 +117,0 @@

@@ -23,3 +23,4 @@ from __future__ import annotations

"""
Validate whether the given value is a valid path.
Validate whether the given value is a valid path. This also expands user
directories to form valid paths.

@@ -42,6 +43,8 @@ Parameters

If value is not a valid path.
RuntimeError
If a user's home directory cannot be expanded.
"""
try:
return Path(value)
return Path(value).expanduser()
except TypeError:

@@ -77,2 +80,6 @@ raise TypeError(

------
TypeError
If value is not a valid path.
RuntimeError
If a user's home directory cannot be expanded.
IsADirectoryError

@@ -79,0 +86,0 @@ If path is a directory.

@@ -1,1 +0,1 @@

__version__ = "0.67.0"
__version__ = "0.68.0"
Metadata-Version: 2.4
Name: databento
Version: 0.67.0
Version: 0.68.0
Summary: Official Python client library for Databento

@@ -17,2 +17,3 @@ License-Expression: Apache-2.0

Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial

@@ -24,3 +25,3 @@ Classifier: Topic :: Office/Business :: Financial :: Investment

Requires-Dist: aiohttp (>=3.9.0,<4.0.0) ; python_version >= "3.12"
Requires-Dist: databento-dbn (>=0.44.0,<0.45.0)
Requires-Dist: databento-dbn (>=0.45.0,<0.46.0)
Requires-Dist: numpy (>=1.23.5) ; python_version < "3.12"

@@ -73,3 +74,3 @@ Requires-Dist: numpy (>=1.26.0) ; python_version >= "3.12"

- aiohttp = "^3.8.3"
- databento-dbn = "~0.44.0"
- databento-dbn = "~0.45.0"
- numpy = ">=1.23.5"

@@ -76,0 +77,0 @@ - pandas = ">=1.5.3"

[project]
name = "databento"
version = "0.67.0"
version = "0.68.0"
description = "Official Python client library for Databento"

@@ -13,3 +13,3 @@ readme = "README.md"

"aiohttp>=3.9.0,<4.0.0; python_version >= '3.12'",
"databento-dbn~=0.44.0",
"databento-dbn~=0.45.0",
"numpy>=1.23.5; python_version < '3.12'",

@@ -46,3 +46,3 @@ "numpy>=1.26.0; python_version >= '3.12'",

[tool.poetry.dependencies]
python = ">=3.10,<3.14"
python = ">=3.10,<3.15"

@@ -49,0 +49,0 @@ [tool.poetry.group.dev.dependencies]

@@ -35,3 +35,3 @@ # databento-python

- aiohttp = "^3.8.3"
- databento-dbn = "~0.44.0"
- databento-dbn = "~0.45.0"
- numpy = ">=1.23.5"

@@ -38,0 +38,0 @@ - pandas = ">=1.5.3"