ccfx


Nameccfx JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryYour package description here
upload_time2024-10-26 13:53:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ccfx

`ccfx` is a comprehensive Python package designed to streamline file and data management, geospatial analysis, and NetCDF file processing for quick prototyping. The library provides versatile tools for file handling, raster and vector manipulation, database connectivity, and data export for geospatial and scientific computing projects.

## Features

1. **File Management**:
   - List, delete, move, and count files within directories.
   - Monitor file count over time in a specific directory.
   - Save, load, and manage Python variables via pickle serialization.

2. **Geospatial Data Processing**:
   - Read, write, and manage raster and vector geospatial data.
   - Clip rasters by bounding boxes and extract raster values at specified coordinates.
   - Create grids of polygons based on shapefile boundaries with user-defined resolutions.
   - Convert coordinates between coordinate reference systems (CRS).
   - Write NumPy arrays to GeoTIFF files with projection and geotransform settings.

3. **NetCDF File Handling**:
   - List available variables and dimensions in NetCDF files.
   - Export NetCDF variables to GeoTIFF format.
   - Calculate sum and average maps from NetCDF data across multiple files.

4. **Database Connectivity**:
   - Access and interact with databases using ODBC and SQLAlchemy for flexible database management.
   - Connect to both SQL Server and SQLite databases.

5. **Progress Tracking and System Info**:
   - Display dynamic progress bars for long-running operations.
   - Check the system’s platform information.
   - Enable or disable warnings programmatically.

6. **Excel and Word File Handling**:
   - Create and modify Excel files using xlsxwriter.
   - Generate Word documents with advanced formatting options using python-docx.

## Installation

Install `ccfx` via pip:
```bash
pip install ccfx
```

## Dependencies

`ccfx` relies on the following libraries:

- **netCDF4**: For working with NetCDF files.
- **gdal**: Required for geospatial raster data manipulation.
- **numpy**: For array processing and numerical operations.
- **pandas**: For data manipulation and analysis.
- **shapely**: Provides geometric operations for spatial data.
- **geopandas**: Extends pandas to handle geospatial data.
- **xlsxwriter**: For creating and writing Excel files.
- **pyodbc**: Enables connectivity to databases through ODBC.
- **sqlalchemy**: Provides SQL toolkit and ORM features for database access.
- **python-docx**: Enables creation and manipulation of Word documents.

These dependencies will be installed automatically when `ccfx` is installed.

## API Reference

### `listFiles(path: str, ext: str = None) -> list`
Lists all files in a directory with a specified extension.

- **Parameters**:
  - `path` (str): The directory to search.
  - `ext` (str, optional): File extension to filter by, e.g., `'txt'`, `'.txt'`, `'*txt'`, or `'*.txt'`.

- **Returns**:
  - `list`: A list of file paths matching the criteria.

### `deleteFile(filePath: str, v: bool = False) -> bool`
Deletes a specified file with optional verbose output.

- **Parameters**:
  - `filePath` (str): Path to the file to be deleted.
  - `v` (bool, optional): If `True`, prints a confirmation message. Defaults to `False`.

- **Returns**:
  - `bool`: `True` if deletion was successful; `False` otherwise.

### `createGrid(shapefile_path: str, resolution: float, useDegree: bool = True) -> tuple`
Generates a grid of polygons from a shapefile at a given resolution.

- **Parameters**:
  - `shapefile_path` (str): Path to the shapefile.
  - `resolution` (float): Resolution of the grid.
  - `useDegree` (bool, optional): If `True`, coordinates are in degrees. Defaults to `True`.

- **Returns**:
  - `tuple`: Contains grid coordinates and metadata.

### `clipRasterByExtent(inFile: str, outFile: str, bounds: tuple) -> str`
Clips a raster to specified bounding box coordinates.

- **Parameters**:
  - `inFile` (str): Path to the input raster file.
  - `outFile` (str): Path to the output clipped raster file.
  - `bounds` (tuple): Bounding box as `(minx, miny, maxx, maxy)`.

- **Returns**:
  - `str`: Path to the clipped raster file.

### `netcdfVariablesList(ncFile: str) -> list`
Lists all variables in a NetCDF file.

- **Parameters**:
  - `ncFile` (str): Path to the NetCDF file.

- **Returns**:
  - `list`: A list of variable names in the file.

### ... And More ...

## Contributing

Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.

## License
This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ccfx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Celray James CHAWANDA <celray@chawanda.com>",
    "download_url": "https://files.pythonhosted.org/packages/24/1d/314aa511c48eccee2b1a5af26c93e2ecc8f1849725629779236f154832aa/ccfx-0.1.0.tar.gz",
    "platform": null,
    "description": "# ccfx\r\n\r\n`ccfx` is a comprehensive Python package designed to streamline file and data management, geospatial analysis, and NetCDF file processing for quick prototyping. The library provides versatile tools for file handling, raster and vector manipulation, database connectivity, and data export for geospatial and scientific computing projects.\r\n\r\n## Features\r\n\r\n1. **File Management**:\r\n   - List, delete, move, and count files within directories.\r\n   - Monitor file count over time in a specific directory.\r\n   - Save, load, and manage Python variables via pickle serialization.\r\n\r\n2. **Geospatial Data Processing**:\r\n   - Read, write, and manage raster and vector geospatial data.\r\n   - Clip rasters by bounding boxes and extract raster values at specified coordinates.\r\n   - Create grids of polygons based on shapefile boundaries with user-defined resolutions.\r\n   - Convert coordinates between coordinate reference systems (CRS).\r\n   - Write NumPy arrays to GeoTIFF files with projection and geotransform settings.\r\n\r\n3. **NetCDF File Handling**:\r\n   - List available variables and dimensions in NetCDF files.\r\n   - Export NetCDF variables to GeoTIFF format.\r\n   - Calculate sum and average maps from NetCDF data across multiple files.\r\n\r\n4. **Database Connectivity**:\r\n   - Access and interact with databases using ODBC and SQLAlchemy for flexible database management.\r\n   - Connect to both SQL Server and SQLite databases.\r\n\r\n5. **Progress Tracking and System Info**:\r\n   - Display dynamic progress bars for long-running operations.\r\n   - Check the system\u2019s platform information.\r\n   - Enable or disable warnings programmatically.\r\n\r\n6. **Excel and Word File Handling**:\r\n   - Create and modify Excel files using xlsxwriter.\r\n   - Generate Word documents with advanced formatting options using python-docx.\r\n\r\n## Installation\r\n\r\nInstall `ccfx` via pip:\r\n```bash\r\npip install ccfx\r\n```\r\n\r\n## Dependencies\r\n\r\n`ccfx` relies on the following libraries:\r\n\r\n- **netCDF4**: For working with NetCDF files.\r\n- **gdal**: Required for geospatial raster data manipulation.\r\n- **numpy**: For array processing and numerical operations.\r\n- **pandas**: For data manipulation and analysis.\r\n- **shapely**: Provides geometric operations for spatial data.\r\n- **geopandas**: Extends pandas to handle geospatial data.\r\n- **xlsxwriter**: For creating and writing Excel files.\r\n- **pyodbc**: Enables connectivity to databases through ODBC.\r\n- **sqlalchemy**: Provides SQL toolkit and ORM features for database access.\r\n- **python-docx**: Enables creation and manipulation of Word documents.\r\n\r\nThese dependencies will be installed automatically when `ccfx` is installed.\r\n\r\n## API Reference\r\n\r\n### `listFiles(path: str, ext: str = None) -> list`\r\nLists all files in a directory with a specified extension.\r\n\r\n- **Parameters**:\r\n  - `path` (str): The directory to search.\r\n  - `ext` (str, optional): File extension to filter by, e.g., `'txt'`, `'.txt'`, `'*txt'`, or `'*.txt'`.\r\n\r\n- **Returns**:\r\n  - `list`: A list of file paths matching the criteria.\r\n\r\n### `deleteFile(filePath: str, v: bool = False) -> bool`\r\nDeletes a specified file with optional verbose output.\r\n\r\n- **Parameters**:\r\n  - `filePath` (str): Path to the file to be deleted.\r\n  - `v` (bool, optional): If `True`, prints a confirmation message. Defaults to `False`.\r\n\r\n- **Returns**:\r\n  - `bool`: `True` if deletion was successful; `False` otherwise.\r\n\r\n### `createGrid(shapefile_path: str, resolution: float, useDegree: bool = True) -> tuple`\r\nGenerates a grid of polygons from a shapefile at a given resolution.\r\n\r\n- **Parameters**:\r\n  - `shapefile_path` (str): Path to the shapefile.\r\n  - `resolution` (float): Resolution of the grid.\r\n  - `useDegree` (bool, optional): If `True`, coordinates are in degrees. Defaults to `True`.\r\n\r\n- **Returns**:\r\n  - `tuple`: Contains grid coordinates and metadata.\r\n\r\n### `clipRasterByExtent(inFile: str, outFile: str, bounds: tuple) -> str`\r\nClips a raster to specified bounding box coordinates.\r\n\r\n- **Parameters**:\r\n  - `inFile` (str): Path to the input raster file.\r\n  - `outFile` (str): Path to the output clipped raster file.\r\n  - `bounds` (tuple): Bounding box as `(minx, miny, maxx, maxy)`.\r\n\r\n- **Returns**:\r\n  - `str`: Path to the clipped raster file.\r\n\r\n### `netcdfVariablesList(ncFile: str) -> list`\r\nLists all variables in a NetCDF file.\r\n\r\n- **Parameters**:\r\n  - `ncFile` (str): Path to the NetCDF file.\r\n\r\n- **Returns**:\r\n  - `list`: A list of variable names in the file.\r\n\r\n### ... And More ...\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please fork the repository, make your changes, and submit a pull request.\r\n\r\n## License\r\nThis project is licensed under the MIT License.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Your package description here",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/celray/ccfx"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d08ba60699aa3f622c866898742a09853866e562b75150a804071af7c69f366",
                "md5": "199328d9d79403a7fd3007848b72fb5e",
                "sha256": "d111ebe47e106a8a209882893ed5da2a2c850e0d82303892595a9dd276c84166"
            },
            "downloads": -1,
            "filename": "ccfx-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "199328d9d79403a7fd3007848b72fb5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 19075,
            "upload_time": "2024-10-26T13:53:07",
            "upload_time_iso_8601": "2024-10-26T13:53:07.411249Z",
            "url": "https://files.pythonhosted.org/packages/0d/08/ba60699aa3f622c866898742a09853866e562b75150a804071af7c69f366/ccfx-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "241d314aa511c48eccee2b1a5af26c93e2ecc8f1849725629779236f154832aa",
                "md5": "67ae3f1a393f5012d09c22bb0695e340",
                "sha256": "82062c0bd44abe0c0a474e032b5e1b0448b0233109f58d49e5628a403aa5d4f1"
            },
            "downloads": -1,
            "filename": "ccfx-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "67ae3f1a393f5012d09c22bb0695e340",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 19155,
            "upload_time": "2024-10-26T13:53:09",
            "upload_time_iso_8601": "2024-10-26T13:53:09.054328Z",
            "url": "https://files.pythonhosted.org/packages/24/1d/314aa511c48eccee2b1a5af26c93e2ecc8f1849725629779236f154832aa/ccfx-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-26 13:53:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "celray",
    "github_project": "ccfx",
    "github_not_found": true,
    "lcname": "ccfx"
}
        
Elapsed time: 0.46425s