cjm-kaggle-utils
Install
pip install cjm_kaggle_utils
How to use
save_kaggle_creds
from cjm_kaggle_utils.core import save_kaggle_creds
username = "name"
key = "12345"
save_kaggle_creds(username, key, overwrite=False)
Credentials already present. Set `overwrite=True` to replace them.
dl_kaggle
from cjm_kaggle_utils.core import dl_kaggle
from pathlib import Path
# Get the path to the directory where datasets are stored
dataset_dir = Path("./Datasets/")
dataset_dir.mkdir(parents=True, exist_ok=True)
print(f"Dataset Directory: {dataset_dir}")
# Create the path to the data directory
archive_dir = dataset_dir/'../Archive'
archive_dir.mkdir(parents=True, exist_ok=True)
print(f"Archive Directory: {archive_dir}")
Dataset Directory: Datasets
Archive Directory: Datasets/../Archive
# Set the name of the dataset
dataset_name = 'style-image-samples'
# Construct the Kaggle dataset name by combining the username and dataset name
kaggle_dataset = f'innominate817/{dataset_name}'
# Create the path to the zip file that contains the dataset
archive_path = Path(f'{archive_dir}/{dataset_name}.zip')
print(f"Archive Path: {archive_path}")
# Create the path to the directory where the dataset will be extracted
dataset_path = Path(f'{dataset_dir}/{dataset_name}')
print(f"Dataset Path: {dataset_path}")
Archive Path: Datasets/../Archive/style-image-samples.zip
Dataset Path: Datasets/style-image-samples
dl_kaggle(kaggle_dataset, archive_path, dataset_path)
Downloading style-image-samples.zip to Datasets/../Archive
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 16.2M/16.2M [00:00<00:00, 44.0MB/s]
!ls {dataset_path}
images
Metadata
Release files for cjm-kaggle-utils 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cjm-kaggle-utils-0.0.5.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cjm_kaggle_utils-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / cjm-kaggle-utils-0.0.5.tar.gz
| Download URL | cjm-kaggle-utils-0.0.5.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc57572d0f3bde351bbbbb94b60dd4d46b989cc9bcb1f711eca81166c0c087a9
|
|
BLAKE2b-256 checksum How to use checksums |
a838214e20ab5cdd309d7647ad78a6043ae85b323610f430789d3540202bb2b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Release files / cjm_kaggle_utils-0.0.5-py3-none-any.whl
| Download URL | cjm_kaggle_utils-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5eefdcbf823528c9d86573652f9ef9b8891eb8b6c8d42d82e0f26c92115aa32a
|
|
BLAKE2b-256 checksum How to use checksums |
96b6a2a80e709d3d9d262d439fb1d3d1cf690359964a781d30ad7e225e5254c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Security for cjm-kaggle-utils 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.