Skip to main content

PutPlace FastAPI server for file metadata storage

Project description

PutPlace Server

A FastAPI-based file metadata storage service using MongoDB.

Installation

pip install putplace-server

Quick Start

# Start MongoDB (using Docker)
docker run -d --name mongodb -p 27017:27017 mongo:latest

# Configure the server (creates admin user, tests connections)
putplace_configure

# Start the server
ppserver start

# Check server status
ppserver status

# View logs
ppserver logs

Features

  • REST API for storing and retrieving file metadata
  • MongoDB backend with async support
  • JWT and API key authentication
  • User registration with email confirmation
  • Admin dashboard for user management
  • S3 storage backend support (optional)
  • Google OAuth integration (optional)

API Endpoints

  • GET / - Root endpoint
  • GET /health - Health check
  • POST /put_file - Store file metadata
  • GET /get_file/{sha256} - Retrieve file by SHA256 hash
  • GET /docs - Interactive API documentation (Swagger UI)
  • GET /redoc - Alternative API documentation

Configuration

Configuration via environment variables or .env file:

MONGODB_URL=mongodb://localhost:27017
MONGODB_DATABASE=putplace
API_TITLE=PutPlace API
API_VERSION=0.8.1

# Admin user (created on first startup)
PUTPLACE_ADMIN_EMAIL=admin@example.com
PUTPLACE_ADMIN_PASSWORD=your-secure-password

Or via ppserver.toml:

[server]
host = "0.0.0.0"
port = 8000

[mongodb]
url = "mongodb://localhost:27017"
database = "putplace"

Server Management

# Start server (background)
ppserver start

# Start with custom options
ppserver start --host 0.0.0.0 --port 8080

# Stop server
ppserver stop

# Restart server
ppserver restart

# Check status
ppserver status

# View logs
ppserver logs
ppserver logs --follow

User Management

# List all users
pp_manage_users list

# Add a new user
pp_manage_users add --email user@example.com

# Delete a user
pp_manage_users delete --email user@example.com

# Reset password
pp_manage_users reset-password --email user@example.com

# Set/unset admin privileges
pp_manage_users setadmin --email user@example.com
pp_manage_users unsetadmin --email user@example.com

# List pending registrations
pp_manage_users pending

# Approve pending user
pp_manage_users approve --email user@example.com

Related

  • putplace-client - CLI tool for scanning directories and uploading file metadata

License

Apache-2.0

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

putplace_server-0.11.3.tar.gz (126.6 kB view details)

Uploaded Source

Built Distribution

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

putplace_server-0.11.3-py3-none-any.whl (116.7 kB view details)

Uploaded Python 3

File details

Details for the file putplace_server-0.11.3.tar.gz.

File metadata

  • Download URL: putplace_server-0.11.3.tar.gz
  • Upload date:
  • Size: 126.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for putplace_server-0.11.3.tar.gz
Algorithm Hash digest
SHA256 7e25d7d31e875fb4e9f35fd22a254ebb9f2c1a3a42870334aff9a80d8bf908b2
MD5 9c7076d82b3d71dc810a7432af3676db
BLAKE2b-256 c274754deae1b1d8e86444bede7bf443eff2a7e1a827a7beaa3ee54a5daae1c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for putplace_server-0.11.3.tar.gz:

Publisher: publish-pypi.yml on jdrumgoole/putplace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file putplace_server-0.11.3-py3-none-any.whl.

File metadata

File hashes

Hashes for putplace_server-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 284695e7b235e72b4b00f6c81a36799609a50c8fc399bd10ad8f7819f162a395
MD5 75f392fe33bffd44514c44fcdb741a79
BLAKE2b-256 4624824d0ab958a05017e1e9b28ee0b9fa2531e2d09b33fbbc9ffbde1d8140b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for putplace_server-0.11.3-py3-none-any.whl:

Publisher: publish-pypi.yml on jdrumgoole/putplace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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