Skip to main content

Bravo! You have received a Medical Diploma from
the Orbital Convergence University International Air and Water Embassy of the Tangerine Planet.

You are now officially certified to include this mixer in your practice.


Please feel free to use this module however (business, personal, etc.) subject to the terms of GPL 3.0 License.

@ BGraceful

ventures

ventures


summary

This is for flipping processes on and off.
As well it is for checking if processes are on or off.


obtain

pip install ventures

tutorial

ventures_map_1.py
import os
import pathlib
from os.path import dirname, join, normpath
import sys
import time

this_folder = pathlib.Path (__file__).parent.resolve ()
the_map = str (
	normpath (join (
		os.getcwd (), 
		"ventures_map.JSON"
	))
)

def turn_on_sanique ():
	return;
	
def turn_off_sanique ():
	return;
	
	
#
#	This needs to return either "on" or "off",
#	"turn on" runs this function to check whether
#	the adventure is "on" or "off.
#
def check_sanique_is_on ():
	return "off"

from ventures import ventures_map
from ventures.clique import ventures_clique

the_ventures = ventures_map ({
	"map": the_map,
	"ventures": [
		{
			"name": "adventure_1",
			"turn on": {
				"adventure": [ 
					"python3",
					"-m",
					"http.server",
					"8080"
				],
				
				"Popen": {},
				
				"kind": "process_identity"
			}
		},
		{
			"name": "adventure_2",
			"kind": "task",
			"turn on": {
				"adventure": turn_on_sanique,
			},
			"turn off": turn_off_sanique,
			"is on": check_sanique_is_on
		}
	]
})

option 1, continued from above

This is the interface to turn on and off ventures

the_ventures ["turn on"] ()
the_ventures ["is on"] ()
the_ventures ["turn off"] ()
the_ventures ["turn on"] ({
	"name": "adventure_1"
})
the_ventures ["turn off"] ({
	"name": "adventure_1"
})
the_ventures ["is on"] ()

option 2, continued from above

Ventures has a click interface group that can be added to a click interface.

import click	
def clique ():
	@click.group ()
	def group ():
		pass

	group.add_command (ventures_clique ({
		"ventures": the_ventures
	}))
	group ()
	
clique ()

The click interface options

Assuming the name of the interface is "voyages".

voyages ventures on
voyages ventures off
voyages ventures status

The adventures can be turned on and off by name.

voyages ventures on --name adventure_1
voyages ventures off --name adventure_1

Starting Passive Processes

#implicit #back

from ventures.utilities.hike_passive_forks import hike_passive_forks
hike_passive ({
	"script": [
	
	],
	"Popen": {}
})

Metadata

Release files for ventures 3.0.0

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

Source distribution (sdist)

Source distribution for ventures 3.0.0
File Size Uploaded
ventures-3.0.0.tar.gz 68.7 kB Details

Release files / ventures-3.0.0.tar.gz

Download URL ventures-3.0.0.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
31461f482a557e4a0e4561f2be16d147f3ca8e66240e6da6cbe6f02d6c7da596
BLAKE2b-256 checksum
How to use checksums
03b172241bc794bd0a0e10ed2c6e729c329b187779d252558b48b7d1d93906c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic

Release history Release notifications | RSS feed

This release

3.0.0 This release

1 release file

2.0.0

1 release file

1.7.3

1 release file

1.7.2

1 release file

1.7.1

1 release file

1.7.0

1 release file

1.6.0

1 release file

1.5.0

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.2

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.0.1

1 release file

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