Skip to main content

Versions Supported

Python

Language Stats

Language count Code coverage

Repo Stats

GitHub GitHub repo size GitHub code size

Code Stats

Modules Python

Activity

GitHub Repo created GitHub commit activity GitHub last commit

Build Status

pypi-publish pages-build-deployment

FileWare

Set up a file server to access files in local machine from anywhere on the internet.

Setup

Environment Variables:

  • username: Username to confirm identity. Defaults to user profile name.
  • password: Password for authentication.
  • port: Port number to serve. Defaults to 4443.
  • host_path: Path which is to be hosted. Defaults to home page.

To host on a public facing URL:

  • ngrok_auth: Ngrok token.

Usage

python3 -m pip install fileware

With Threading

from threading import Thread

import fileware


fileware.models.env.port = 4568
fileware.models.env.host_dir = "movies"


if __name__ == '__main__':
    # Initiates the connection and creates a new process if ngrok auth token is valid.
    response = fileware.initiate_connection()
    print(response.url)

    # Runs the server in a thread alongside starting the ngrok process created previously.
    thread = Thread(target=fileware.serve,
                    kwargs={'http_server': response.server, 'process': response.process})
    thread.start()

    # Do your own task here

    # Shutdown the server and join the thread which spun the server up.
    fileware.shutdown(http_server=response.server, process=response.process)
    thread.join(2e+1)

Without Threading - File Server will terminate only when the main process is killed.

import fileware


if __name__ == '__main__':
    response = fileware.initiate_connection()
    print(response.url)
    fileware.serve(http_server=response.server,process=response.process)

Env vars can be loaded by placing a .env file in current working directory.

The serve function can also take arguments which can be used to override env vars.

Pypi Package

pypi-module

https://pypi.org/project/fileware/

Coding Standards

Docstring format: Google
Styling conventions: PEP 8
Clean code with pre-commit hooks: flake8 and isort

Linting

PreCommit will ensure linting, and the doc creation are run on every commit.

Requirement

pip install --no-cache pre-commit recommonmark sphinx==5.1.1

Usage

pre-commit run --all-files

Pypi Package

pypi-module

https://pypi.org/project/fileware/

Runbook

made-with-sphinx-doc

https://thevickypedia.github.io/fileware/

© Vignesh Rao

Licensed under the MIT License

Metadata

Release files for fileware 1.3

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

Built distribution (wheel)

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

Release files / fileware-1.3-py3-none-any.whl

Download URL fileware-1.3-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37bb0784d14fd60ed7a252c8259a8a4730f48797faa3ff3edfac0c008fdccbf4
BLAKE2b-256 checksum
How to use checksums
49d154cd69c68fe348fd6eb62f3394b5c228544215b22708cb67321a871a360e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for fileware 1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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