semvec/pypi-packages huggingface dataset:
puppetry 0.0.1
puppetry with objects
License: MIT
Keywords: socketserver socket pickle serializer

puppetry
========

.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg
  :alt: Gitter
  :target: https://gitter.im/axju/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link

.. image:: https://img.shields.io/twitter/url/https/github.com/axju/axju.svg?style=social
  :alt: Twitter
  :target: https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Faxju%2Fpuppetry

Remote objects, like puppet.

For a small project I need to communicate between two process. In one process I
have a class which create an object. The other process should access the
functions and variables of this object. The process play with the object like an
puppetry.

Install
-------
::

  pip install puppetry

Basic usage
-----------
Example class::

  class HelloWorld(object):

      def __init__(self, name=''):
          self.name = name

      def hello(self, name=None):
          if name: return 'Hello ' + name
          return 'Hello ' + self.name

Server::

  from puppetry import RemoteServer

  server = RemoteServer((HOST, PORT), obj=HelloWorld('world'))
  server.start()

Client::

  from puppetry import RemoteClient

  client = RemoteClient((HOST, PORT))
  print(client.hello())

  client.name = 'puppetry'
  print(client.hello())

See more examples in the example folder.

Development
-----------
Clone repo::

  git clone https://github.com/axju/puppetry.git

Create virtual environment and update dev-tools::

  python3 -m venv venv
  source venv/bin/activate
  pip install --upgrade wheel pip setuptools twine tox

Install local::

  pip install -e .

Publish the packages::

  python setup.py sdist bdist_wheel
  twine upload dist/*

Run some tests::

  tox
  python setup.py test
welovenad 1.0.0
a demo package for NAD !
License: MIT
Requires Python: >=3.6

This is a demo to push a package on PyPi

## Python project
Présentation des différents fichiers présents

## Choose your distribution
on peut choisir entre distribute, setuptools, distutils ou Distutils2.
Seule solution passe partout pour le moment c’est setuptools !

## setup.py

## Make your Package "user friendly"
- __init__.py

The __init__.py files are required to make Python treat the directories as containing packages; 
this is done to prevent directories with a common name, such as string, from unintentionally hiding 
valid modules that occur later on the module search path. 
In the simplest case, __init__.py can just be an empty file, but it can also execute initialization 
code for the package or set the __all__ variable, described later.

- __version__

- __all__

- easy import functions

## Test on local environment

- pipdeptree

$ python setup.py install

## Push on PyPi

- Make sure you have the latest versions of setuptools and wheel installed:

    $ python3 -m pip install --user --upgrade setuptools wheel

- Generating distribution archives

    $ python3 setup.py sdist bdist_wheel

- Twine is a utility for interacting with PyPI, that offers a secure replacement for setup.py upload.	

    $ python3 -m pip install --user --upgrade twine

- upload all of the archives under dist:

 	$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*

## Installing new uploaded package

python3 -m pip install --index-url https://test.pypi.org/simple/ welovenad

## Ressources

##### Getting started / simple project
> https://packaging.python.org/tutorials/packaging-projects/

##### Building and Distributing Packages with Setuptools
> https://setuptools.readthedocs.io/en/latest/setuptools.html

##### Packaging Python Projects
> https://packaging.python.org/guides/distributing-packages-using-setuptools/

##### Repository BJC 
> https://github.com/BenJoyenConseil/pybbl