Skip to content

witzbeck/alexlib

Repository files navigation

Here's a draft of the README for the repository witzbeck/alexlib:

alexlib

alexlib is a Python library developed for use in multiple projects. It provides various utilities and functionalities to support development needs.

Features

  • Iterators and Generators: Custom functions for iterating and generating combinations.
  • Constants: Predefined constants for formatting and paths.
  • API Objects: Base classes for API requests and objects.
  • File Utilities: Functions for handling file sizes, timestamps, and other file operations.
  • Machine Learning: Tools for working with machine learning models and data.
  • DataFrames: Data manipulation and analysis tools for working with pandas DataFrames.
  • Authentication: Functions for handling authentication and user sessions.
  • Core: Core utilities and helper functions for general use.
  • Times: Time and date utilities for working with timestamps and time zones.

Installation

To install this library, you can use pip after cloning the repository:

pip install -e /path/to/alexlib

Usage

Iterators and Generators

The iters.py module provides useful functions for generating index lists, combinations, and more.

from alexlib.iters import idx_list, get_comb_gen

# Example usage
shape = (3, 4)
indexes = idx_list(shape)

list_ = [1, 2, 3]
combinations = list(get_comb_gen(list_, 2))

Constants

The constants.py module defines various constants used throughout the library.

from alexlib.constants import DATE_FORMAT, PROJECT_PATH

print(DATE_FORMAT)
print(PROJECT_PATH)

API Objects

The api/objects.py module provides base classes for making API requests and handling API objects.

from alexlib.api.objects import ApiRequest, ClientBase

request = ApiRequest(url="https://api.example.com/data")
client = ClientBase(host="example.com", token="your_token")

File Utilities

The files/ directory contains modules for handling file sizes, timestamps, and utility functions.

from alexlib.files.sizes import FileSize
from alexlib.files.times import SystemTimestamp

size = FileSize.from_path("/path/to/file")
timestamp = SystemTimestamp.from_path("/path/to/file")

Contributors

For a complete list of contributors, please visit the contributors page.

License

This project is licensed under the terms of the MIT license.

About

development used in multiple projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages