Skip to main content

BoxUtils

A class using the box_sdk_gen python SDK for doing basic file and folder operations.

Configuration Info Locations

Key information is stored in the developer console for the selected app in Platform Apps.

The User ID and Enterprise ID is found on the General. Settings/App Info section.

The service account which folders/files should be shared with is located on the General Settings/Service Account Info section.

The app configuration json file can be downloaded under the Configuration/App Settings section.

Two files are required for initialization of the class

  1. box.env - contains information about the JWT user id and the enterprise id
# JWT Settings
JWT_USER_ID = 397515XXXX
ENTERPRISE_ID = 686XXX
  1. box.config.json - contains the JWT credentials. This is downloaded from the box dev console.
# Sample app configuration file
{
  "boxAppSettings": {
    "clientID": "1u3gto5in5gff7ve8031tx8x6kl8xxxx",
    "clientSecret": "********************************",
    "appAuth": {
      "publicKeyID": "",
      "privateKey": "",
      "passphrase": ""
    }
  },
  "enterpriseID": "686XXX"
}

Sample usage

You can find the full sample usage script in the sample_usage.py file.

Note you may need to customize the folder ids for your account.

To run the sample usage script, use the following command:

source .venv/bin/activate
python BoxUtils/sample_usage.py

For package creation and publishing

Be sure to update the setup.py with version information.

# create the dist
python -m build

# upload the package
# credentials for pypi.org are kept in ~/.pypirc
twine upload dist/*

Metadata

Release files for BoxUtils 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BoxUtils 0.1.11
File Size Uploaded
boxutils-0.1.11.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BoxUtils 0.1.11
File Interpreter ABI Platform
boxutils-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 21.2 kB

Release files / boxutils-0.1.11.tar.gz

Download URL boxutils-0.1.11.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d932f626955a7ab3b2e4835b5eadb639b880f94f8714642dd02e279a4950e7f3
BLAKE2b-256 checksum
How to use checksums
b5fd99fe876ad1375718de56271fd06debb181c991cb876b48ce4e6fa379a30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / boxutils-0.1.11-py3-none-any.whl

Download URL boxutils-0.1.11-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60b6a34f5115da6092f0df6fca42b4e2bf32ec4348273f44bd1dd1c6371f0f9f
BLAKE2b-256 checksum
How to use checksums
e5327edcaa97fd57d94aa03cbd2c4534b56e240ba1098f9f24d23dbbaaf516ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page