No project description provided
Project description
important
🎁 Import-ANT 🐜 The folder of python functions and classes we can import
📦 Installation
Very simple version
pip install import-ant
With other distributions
pip install import-ant[redis]
or
pip install import-ant[kafka,redis]
pip install import-ant[kafka,snowflake]
or just get greedy and install everything, with a specified version 🚀🏎💣🔪🔫🔨🧨🧱🧲🧪🧬🧯🧰
pip install import-ant[all]==0.0.1
🧱 Databricks
Within Databricks notebooks, we can do:
import sys
sys.path.append("/Workspace/Repos/ray@fireworkhq.com/important/src")
🔌 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)]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
import-a-0.0.1.tar.gz
(16.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
import_a-0.0.1-py3-none-any.whl
(14.1 kB
view details)
File details
Details for the file import-a-0.0.1.tar.gz.
File metadata
- Download URL: import-a-0.0.1.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a173dc8cf7672a7d8ab218bbd143c6bf3978458b93e07ea8d8eecd39e25f9dc
|
|
| MD5 |
830c0fe30f0f7f0b3bd0b7d64083b919
|
|
| BLAKE2b-256 |
446a5e21e04399bb891b3d3f440b0b24da6815d49a1e36294c75d053077254f9
|
File details
Details for the file import_a-0.0.1-py3-none-any.whl.
File metadata
- Download URL: import_a-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4e614f5815cdff124c64229fcd2d84e08bd7514db06fdafd47c1e45458cc31
|
|
| MD5 |
218c66e0429194ec1bc67cfa8969fd6a
|
|
| BLAKE2b-256 |
e1c4b25b727e8bea2d38d4312aa27037947903d611cd74c2ee8a72aec96b2b2f
|