Git Product home page Git Product logo

aes_gcm's Introduction

How to build a package?

This repository contains an encryption package based on AES Encryption in GCM mode, along with this Readme shows how to build a Python package from a script.

Building a local Python package involves several steps, including organizing your code, writing necessary files like setup.py, and potentially distributing it via PyPI if you want it to be installable via pip. Here's a basic guide to get you started:

  1. Organize Your Code First, you need to organize your Python code. Suppose you have a project named example_pkg. Your directory structure should look something like this:
example_pkg/
│
├── example_pkg/
│   ├── __init__.py
│   └── your_module.py
├── setup.py
└── README.md

In example_pkg/example_pkg/, init.py can be empty but must be present to tell Python that this directory should be considered a Python package. your_module.py is where your actual code goes.

  1. Write setup.py setup.py is a build script for setuptools. It tells setuptools about your package (such as the name and version) as well as which code files to include. An example setup.py might look like this:

setup.py

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
from setuptools import setup, find_packages

setup(
    name="example_pkg",
    version="0.1",
    packages=find_packages(),
    install_requires=[
        # Any dependencies you have go here
    ],
    # More metadata like author, description, etc.
)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1. Create Other Important Files README.md: This is your project's readme file, which typically includes an introduction to your package, installation instructions, and examples of how to use it. LICENSE: If you want to make your package open source, you should include a license file.

  2. Build Your Package You can use setuptools to create a source distribution. In your terminal, navigate to the same directory as setup.py and run:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
python setup.py sdist
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

5.Install Your Package Locally

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pip install .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

aes_gcm's People

Contributors

ihrishikesh0896 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.