Skip to main content

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.

Metadata

Release files for osfexport 1.0.1

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

Source distribution (sdist)

Source distribution for osfexport 1.0.1
File Size Uploaded
osfexport-1.0.1.tar.gz 1.4 MB Details

Built distribution (wheel)

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

Total release size: 2.7 MB

Release files / osfexport-1.0.1.tar.gz

Download URL osfexport-1.0.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
a04f8c884b7295effea3076a93a180de9f20070288c75a6b4560a1300918b097
BLAKE2b-256 checksum
How to use checksums
6d851cfa69afa1d4989d64eae276f3b3f8983fa7e3c67a083de7482b04a29d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / osfexport-1.0.1-py3-none-any.whl

Download URL osfexport-1.0.1-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7bcb7e19fdf7bb569f43e863d5c4eceb37aa9b8a5320c2b21296c20bcea846f3
BLAKE2b-256 checksum
How to use checksums
5567eee5c60818a07baf33b2a9c012aeeec4c74521b32842b2031f625a4dbdc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

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