Skip to main content

No project description provided

Project description

Tests

ckanext-files

Files as first-class citizens of CKAN. Upload, manage, remove files directly and attach them to datasets, resources, etc.

Read the documentation for a full user guide.

Also, check documentation of the file-keeper library. It's used by this extension and contains logic that does not depend on CKAN and may be useful if you are going to implement custom storage adapter or just want to use familiar file abstractions in the arbitrary program.

Quickstart

  1. Install the extension

    pip install ckanext-files
    
  2. Add files to the ckan.plugins setting of the CKAN config file.

  3. Run DB migrations

    ckan db upgrade -p files
    
  4. Configure storage

    ckanext.files.storage.default.type = files:fs
    ckanext.files.storage.default.path = /tmp/example
    ckanext.files.storage.default.initialize = true
    
  5. Upload your first file

    ckanapi action files_file_create upload@~/Downloads/file.txt`
    

Development

Install dev extras and nodeJS dependencies:

pip install -e '.[dev]'
npm ci

Run unittests:

pytest

Run frontend tests:

# start test server in separate terminal
make test-server

# run tests
npx cypress run

Run typecheck:

npx pyright

License

AGPL

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

ckanext_files-1.3.0.tar.gz (106.2 kB view details)

Uploaded Source

Built Distribution

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

ckanext_files-1.3.0-py3-none-any.whl (139.8 kB view details)

Uploaded Python 3

File details

Details for the file ckanext_files-1.3.0.tar.gz.

File metadata

  • Download URL: ckanext_files-1.3.0.tar.gz
  • Upload date:
  • Size: 106.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ckanext_files-1.3.0.tar.gz
Algorithm Hash digest
SHA256 36bfafb1b964fcbaf4bc83bb8f7b2e447add6e76d15947ad033349bb4c8ef57d
MD5 d93f91ac8ea7762a196fe3f61d7bf86a
BLAKE2b-256 b646404343c962f6d75e1e6d3a985f8aaa8e260a82835369d8540a69a0be5190

See more details on using hashes here.

File details

Details for the file ckanext_files-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ckanext_files-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 139.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ckanext_files-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76c3f9242efae1ce262d4764a2a629e9ba945612e5da1557bd275cc49165a361
MD5 a4a836a57d1d4fda11da94c5bde314c2
BLAKE2b-256 518122114e30ed71b87b224d36a3b7ec8c3fad7daf91a5b6a6b32a0c7aab8c7f

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