Skip to main content

A package for exporting projects from the Open Science Framework web app. Comes with a command-line interface for exporting projects.

Project description

OSF Project Exporter

osfexport is a proof-of-concept Python library and command-line tool for exporting research project data and files from the OSF website. It enables researchers to export project data into a PDF for archiving and backup of OSF projects. The project data exported includes:

  • Project metadata: title, description, funding sources, subjects, tags, date created, date modified, etc.
  • A list of project files stored on OSF Storage. Files stored on the OSF can be downloaded directly from the website, you can use this list to check what files should be present.
  • A list of contributors for the project: name, if they are bibliographic (appear on citations and public list of contributors), profile link
  • Wiki page contents - includes formatted markdown and images
  • Any components added as a sub-project

Currently this project is a proof-of-concept for data backup for the OSF focused on exporting project data which doesn't have a way to do so on the OSF website. It could be extended to include preprints, registrations, and other data types.

Installation

Install this library via pip: python -m pip install osfexport

Usage

osfexport can be used as either a Python library or a command-line tool.

To use as a command-line tool:

  • On the OSF website, create or log in to your account and set up a personal access token (PAT)
    • Go to your account settings, select Personal access tokens in the left side menu
    • Click Create token. You should give the token a name that helps you remember why you made it, like "PDF export"
    • Give your token the osf.full_read scope. This allows the token to access private projects you are a contributor to.
  • Run osfexport to get a list of basic commands you can use.
  • To see what a command needs as input, type --help after the command name (e.g. osfexport welcome --help; osfexport --help)
  • To export all your projects from the OSF into a PDF, run osfexport projects.

Development Setup

Virtual Environment

  1. Clone this repository onto your local machine.
  2. Create a virtual environment to install dependencies. For virtualenv this is done with virtualenv <myenvname>. Make sure your virtual environment is setup to use Python 3.12 or above (e.g., virtualenv <myenvname> --python="/usr/bin/python3.12" on Linux.)
  3. From local Git repo: Activate your virtual environment and run pip install -e osfexport to install this repository as a modifiable package.
  4. On the OSF website, create or log in to your account. Set up a personal access token (PAT) by going into your account settings, select Personal access tokens in the left side menu, and clicking Create token. You should give the token a name that helps you remember why you made it, like "PDF export", and choose the osf.full_read scope - this allows this token to read all public and private projects on your account.

Acknowledgements

Work for v1.0.0 of osfexport was kindly funded by the Advance Open-Source Infrastructure for Research grant, as part of the The Open Source Awardee Program by the Center for Open Science, and a collaboration between Center for Open Science and the University of Manchester Research IT department.

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

osfexport-1.0.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

osfexport-1.0.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file osfexport-1.0.1.tar.gz.

File metadata

  • Download URL: osfexport-1.0.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for osfexport-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a04f8c884b7295effea3076a93a180de9f20070288c75a6b4560a1300918b097
MD5 b7e37ae2e8bf8fffc58e49e3949bfb1f
BLAKE2b-256 6d851cfa69afa1d4989d64eae276f3b3f8983fa7e3c67a083de7482b04a29d0e

See more details on using hashes here.

File details

Details for the file osfexport-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: osfexport-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for osfexport-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bcb7e19fdf7bb569f43e863d5c4eceb37aa9b8a5320c2b21296c20bcea846f3
MD5 177b77dce630b3e28268f5629b993b23
BLAKE2b-256 5567eee5c60818a07baf33b2a9c012aeeec4c74521b32842b2031f625a4dbdc5

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