Skip to main content
Injectables
=======================

This is a super lightweight library for creating dependency injectables
::
@injectable
def how_are_you():
return "how_are_you?"


@injectable
def im_fine(how_are_you):
print(how_are_you)
return 'I am fine'


@injectable
def conversation(im_fine):
print (im_fine)
print ('good to hear')


# run function as injectable, which resolves and injects all dependencies first
conversation()
# how are you?
# I am fine
# good to hear

# override injection flow and call normally
conversation(override=True, im_fine="hey!!!!")
# hey!!!!
# good to hear

Download files

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

Source Distribution

injectables-0.0.6.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file injectables-0.0.6.tar.gz.

File metadata

  • Download URL: injectables-0.0.6.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for injectables-0.0.6.tar.gz
Algorithm Hash digest
SHA256 dc55fb2a2d998b0ee16f7c2c2352d18adf6c0dac218f0d2467e5558d0a9f7cf2
MD5 d68369127cce7a62abc7d0ab269cfef3
BLAKE2b-256 36f48c1badea6f3a85228904fc99de760dc8d745a6de0868f2391fe97868ca45

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 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