Skip to main content

Reloc

Features

  • Serves as a simple file transfer service between client and server. Initially designed for easy transfer of files to single-board computers, such as the Raspberry Pi.
  • Can be used both locally on the network or externally over the internet.
  • Reloc can be used as a command-line application for easier transfer of files from the command prompt.

Installation

$ pip3 install reloc

Usage

Server-side

Start server where you want to receive files. If no path is specified the home folder is used. Two modes of the server can be used; internal or external. By using the internal mode, only connection over the local network is possible. By using external mode, connection to the server can be made over the internet if the specified port is open in the network.

import reloc

# Starting server to handle external connections, i.e. over the internet.
server = reloc.server(mode = 'external', port = 1750, 
    def_path = '/users/antonnormelius/documents')

# Start listening for incoming data stream.
server.receive()

Client-side

Client is used to transfer files and folders to server. Observe that the host and port for the client need to be the same as the host and port for the server.

import reloc

# Connecting to external server.
client = reloc.client(host = '92.34.13.274', port = 1750)

# Sending a text file.
filename = 'test.txt'
client.transmit(filename)

# Sending a folder.
foldername = 'test'
client.transmit(foldername)

# Disconnect from the client.
client.disconnect()

Command-Line Application

Reloc can be used as a command-line application in order to transfer files to the server using the command prompt, i.e. terminal.

Transfer of files/folders.
# Send file internally.
$ reloc send file.txt

# Send folder internally.
$ reloc send foldername

# Send file externally.
$ reloc send file.txt --host 92.34.13.274 --port 1750

# Send folder externally.
$ reloc send foldername --host 92.34.13.274 --port 1750
Start server both internally and externally.
# Start internal server, i.e. using localhost and predefined port.
$ reloc start internal

# Start external server. Observe that port needs to be specified.
$ reloc start external 1750

# Start external server on predefined host and port.
$ reloc start external 1750 --host 192.168.1.10

Releases

  • 0.0.4 - Major updates to how the CLI works.
  • 0.0.3 - Initial stable release.

License

MIT

Release files for reloc 0.0.6

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

Source distribution (sdist)

Source distribution for reloc 0.0.6
File Size Uploaded
reloc-0.0.6.tar.gz 9.9 kB Details

Built distribution (wheel)

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

Total release size: 21.4 kB

Release files / reloc-0.0.6.tar.gz

Download URL reloc-0.0.6.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e74cbf49092c8d5c80baa1427fe427e8613cfc02e79d5844f46c9a2f6aa3fa15
BLAKE2b-256 checksum
How to use checksums
ab29894ef003f82939fd856d2e15cf755e0c19062631ed40b591a6c24b2df97d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.3

Release files / reloc-0.0.6-py3-none-any.whl

Download URL reloc-0.0.6-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e793f2e10ba47c2dd32213f133ee638d96e74ede5b76678ed20fb42f286b4e6
BLAKE2b-256 checksum
How to use checksums
7e3c8e3865a65bab151d63345756c648eba79be7755af05ceab7244a140db069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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