A demo PyPi package to demonstrate Python code distribution in a safe and automated way
Project description
SafePI
A PyPi package to demonstrate Python code distribution in a safe and automated way
Steps
- Make a package with file structure like this demo package
- The src folder contains source code of the normal Python package project
- The src/libs contains necessary .pyd(.so) files
- The
libs_root.py
must be included at the head of py files where some pyd module is called. - The
src_cython
folder is the Cython files needed to protect and compile as pyd files. - The
build_pakcage.py
in the root andbuild_cython_libs.py
in the src_cython are automated scripts respectively. - Please see examples folder to see how to test a function from the PyPI package where the code is compiled and protected.
Functions
You cannot find the source code of Person.py in this package, which prevents code theft.
from safepi.World import greet_times
# This function's algorithm is within a .pyd (.so in Linux) file compiled by Cython.
# The source code cannot be found in the package and is therefore protected.
greet_times(n=5)
build_package.py
: rapidly build Cython files, PyPI package and upload the package to PyPI website quickly. (your upload token is required!)
src_cython/build_cython_libs.py
: Rapidly build Cython files and deploy all *.pyd
files to to `src/libs' folder
License
The SafePI
project is provided by Donghua Chen.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file SafePI-0.0.1a1.tar.gz
.
File metadata
- Download URL: SafePI-0.0.1a1.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83f2b34b4cf6a4cd8fad5a503169414b7f1652b29d0df42af764b6214296455 |
|
MD5 | a1596b9b8671dd7251d6dfb0b548330c |
|
BLAKE2b-256 | 2134c06e92eeed96485549624a7206bf64cb3333763ac1ee28c75fd901280e2b |
File details
Details for the file SafePI-0.0.1a1-py3-none-any.whl
.
File metadata
- Download URL: SafePI-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f90a1d28556d7c998eab3db518d41353b0b1fe7777f646e2d75074d8317d3d73 |
|
MD5 | 2be274361a96a252e96371fc53173f2a |
|
BLAKE2b-256 | 6ce2123a3181d6aa6ab6f7261809cab9fb6d57ae3f5659635f1265ce18422f82 |