Skip to main content

important

🎁 Import Ant 🐜 The folder of python functions and classes we can import

PyPI version test pypi build

import ant avatar

📦 Installation

Import Ant is meant to be as light weight as possible, say you want to import some re-useable code for redis, but you don't want to install every dependency for kafka, snowflake, etc. You can install just the redis part with out worring to manage the distribution about anything else.

Very simple version

pip install import-a

With other distributions

pip install "import-a[redis]"

or

pip install "import-a[kafka,redis]"
pip install "import-a[kafka,snowflake]"

or just get greedy and install everything, with a specified version 🚀🏎💣🔪🔫🔨🧨🧱🧲🧪🧬🧯🧰

pip install "import-a[all]==0.0.1"

🔌 Connectors

❄️ Snowflake

from important.snowflake import SnowFlakeDatabricks
sf = SnowFlakeDatabricks.from_config()

# read data into a pandas dataframe
df = sf("SELECT * FROM some_table")

🍄 Redis

from important.redis import Redis, RedisAsync, RedisController

Vanilla Redis

# connect to redis
redis_client = Redis(host="localhost", db=0)

control = RedisController.from_task(redis_client, task="channel_pop")

# save data by key
control[dict(channel_id=137, user_id=424242)] = "Some string data"

Async Redis

redis_client = RedisAsync(host="localhost", db=0)

control = RedisControllerAsync.from_task(
    redis_client, task="channel_pop")

# save data by key, sadly the await expression doesn't support the [] syntax
await control.set(dict(channel_id=137, user_id=424242), "Some string data")

# get data by key
await control[dict(channel_id=137, user_id=424242)]

Metadata

Release files for import-a 0.0.25

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

Source distribution (sdist)

Source distribution for import-a 0.0.25
File Size Uploaded Provenance
import_a-0.0.25.tar.gz 75.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for import-a 0.0.25
File Interpreter ABI Platform
import_a-0.0.25-py3-none-any.whl Python 3 none any Details

Total release size: 152.0 kB

Release files / import_a-0.0.25.tar.gz

Download URL import_a-0.0.25.tar.gz
Size 75.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c7afefaa31986635ebb9309174d0a39d23401f1944fed331c7f5c2b89402c54d
BLAKE2b-256 checksum
How to use checksums
dc72ef9d7061645a1f7cae13f4f815f42cb18703eb0387fd454ddc73b52acf84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / import_a-0.0.25-py3-none-any.whl

Download URL import_a-0.0.25-py3-none-any.whl
Size 76.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a09e9f96182643c13d90bff934cabcdbc1301bcbcdad976fa0a7714ec9a5aee
BLAKE2b-256 checksum
How to use checksums
337cc4cb2b0f29db7b23626120368b8883afbf3a9d898864f9ed225dd1b32932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for import-a 0.0.25

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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