Skip to main content

Hot-swapper for Python

Project description

Hotswap for Python

Install

pip install hotcodeswap

Usage

Decorate the main function with @hotswap.main

Example

import hotswap
from time import sleep

def function():
    print('hoge')

class Calculater:

    def add(self, x, y):
        return x + y

@hotswap.main # add this to main function
def main():   # cannot be hot-swapped to the main function
    calc = Calculater()
    while True:
        function()
        print(calc.add(2, 3))
        sleep(1)

if __name__ == '__main__':
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hotcodeswap-1.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hotcodeswap-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file hotcodeswap-1.0.1.tar.gz.

File metadata

  • Download URL: hotcodeswap-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for hotcodeswap-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d28d341192ac18fa62b1565562e10ae847ce675e4b120e7acdfd7837751e533e
MD5 96b7d677d84dc2dc5e10f6228ad714c3
BLAKE2b-256 36819095affcd59007d270001f6ae34120bb7663f32efd66fa3fa64836c2bcd6

See more details on using hashes here.

File details

Details for the file hotcodeswap-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: hotcodeswap-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for hotcodeswap-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce399e1d6fcf9a3410e0ca785caa33254c35119e4b830d11fd8509c4e29bb21b
MD5 e2731daba511a5d81b39582d9de6bcdd
BLAKE2b-256 fc968f0cdbb94591b70919f7426729148ab5bffc4aa04f2fb253e5882ab4304e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page