Skip to main content

A utility package for performing Box file and folder operations with a service account

Project description

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.

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/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boxutils-0.1.10.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

boxutils-0.1.10-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file boxutils-0.1.10.tar.gz.

File metadata

  • Download URL: boxutils-0.1.10.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for boxutils-0.1.10.tar.gz
Algorithm Hash digest
SHA256 b49374b07eb155ae262d71a2eeb9f2a6610bc5f3995dfa6cb4dd4b280ec1d40c
MD5 dd80c88593099ff5d24a9e189026a8f8
BLAKE2b-256 df86b7e131a438126cced0140e4d12f1a93fecd0dfdf3e6c1deb572cbb5979e0

See more details on using hashes here.

File details

Details for the file boxutils-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: boxutils-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for boxutils-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ce1f2956ac647b953ebb0d45d1523769b9dbe4e72cb6daa41b74c3aaaf8ebd75
MD5 85112334aa0122aa2839d1c41ec4be59
BLAKE2b-256 631881087b60d3c4a4479ca79d8e7e5f159209adcd2b9a12e331d6fda97f5224

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page