Skip to main content

Badge License - MIT 3-Clause PyPI Downloads Visitors

SFSGL (Simple File Sharing Gathering Library)

███████╗███████╗███████╗ ██████╗ ██╗
██╔════╝██╔════╝██╔════╝██╔════╝ ██║
███████╗█████╗  ███████╗██║  ███╗██║
╚════██║██╔══╝  ╚════██║██║   ██║██║
███████║██║     ███████║╚██████╔╝███████╗
╚══════╝╚═╝     ╚══════╝ ╚═════╝ ╚══════╝
┌───────────────────────────────────────┐
│Simple File Sharing & Gathering Library│
└───────────────────────────────────────┘

Description

This is a simple file-sharing and gathering library. It provides a simple interface to share and gather files. The library is implemented using Flask and Flask-RESTful. The library provides two interfaces, one for sharing files and the other for gathering files. The library is implemented in a way that it can be used as a standalone application. This library's main purpose is to apply programming course assignments and quizzes safely and securely (without using ChatGPT, Copilot, etc.). For example, in your lab, if you have an intranet you can share your programming assignments with your students and gather their solutions without using any other tools. They only reach your server and they can't connect outside of the lab network.

Installation

You can install the library using pip.

pip install sfsgl

Docker installation and running

You can run this docker command to build and run the application using the docker container.

docker build -t my-python-app .
docker run -p 5001:5001 -p 5002:5002 my-python-app

Usage

You can use the library as a standalone application. You can run the following command to start the application.

python -m sfsgl

Example Usage

    from SFSGL.sfsgl import SFSGL

    if __name__ == '__main__':
        session = SFSGL(shared_folder_path= "exact_path_to_shared_folder")
        session.start()

!!! You'll need to specify the the exact path of the shared folder otherwise the library cannot find your folder path.

Configuration Parameters

  • shared_folder_path : path to the folder where the files will be shared, default is "shared"

  • gathered_folder_path : path to the folder where the files will be gathered, default is "gathered"

  • allowed_extension_to_gather : list of allowed file extensions to gather, default is ["py","zip"]

  • allowed_extension_to_share : list of allowed file extensions to share, default is ["py","zip","txt"]

  • allow_multiple_upload : boolean value to allow multiple file upload per user, default is "True"

  • add_ip_to_file : boolean value to add the IP address of the user to the file name, default is "True"

  • shared_port : port number to file sharing interface, default is 5001

  • gathered_port : port number to file gathering interface, default is 5002

Contribution

You can contribute to the library by forking the repository and sending a pull request. You can also report bugs and feature requests by creating an issue. Btw. the author has no idea about the security of the library. If you find a security issue do not hesitate to fix it and send a pull request.

License

MIT License

Copyright (c) 2025 Hasan Ali ÖZKAN

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for sfsgl 0.1.11

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

Source distribution (sdist)

Source distribution for sfsgl 0.1.11
File Size Uploaded
sfsgl-0.1.11.tar.gz 169.8 kB Details

Built distribution (wheel)

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

Total release size: 337.1 kB

Release files / sfsgl-0.1.11.tar.gz

Download URL sfsgl-0.1.11.tar.gz
Size 169.8 kB
Tags Source
SHA-256 checksum
How to use checksums
064bf1098aa99f62e42663e8bda231f1ca9c57434dfac4e5eec8787254b4e1f2
BLAKE2b-256 checksum
How to use checksums
e60074adac009d2b99e59077467cb926e3b37b4727df74b94460e83612a06b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sfsgl-0.1.11-py3-none-any.whl

Download URL sfsgl-0.1.11-py3-none-any.whl
Size 167.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3ef725c47e20a0ab5d5f4f766148c099fc2de4ab1889704058db88e135aa004
BLAKE2b-256 checksum
How to use checksums
ac7d226f301464ba9cfd2187f50fb5af6f339c9a52dad125a96d01808116613f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.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