Thanks to visit codestin.com
Credit goes to github.com

Skip to content

er-ri/fscraper

Repository files navigation

Introduction

The project contains a collection of functions used to scrape financial data, together with financial indicators calculator such as RSI, beta, MACD, etc.

Installation

pip install fscraper

Development

Setting up development environment

# Clone the repository
git clone https://github.com/er-ri/fscraper.git
cd fscraper

# Install in development mode with optional dependencies
pip install -e ".[dev]"

Version Management

This project uses setuptools_scm for automatic version management from Git tags, following the same approach as pandas, numpy, and other major Python packages.

Key features:

  • Versions are automatically generated from Git tags
  • No manual version management needed
  • Follows semantic versioning (SemVer)
  • Development versions include commit hash

Creating a new release:

  1. Development: Version is automatically derived from git history

    # Check current version
    python -c "import fscraper; print(fscraper.__version__)"
  2. Create a release: Simply create and push a git tag

    # Create and push a tag for version 1.1.0
    git tag v1.1.0
    git push origin v1.1.0
  3. Automated release: GitHub Actions will automatically:

    • Build the package
    • Create a GitHub release
    • Publish to PyPI

Version format examples:

  • Clean release: v1.0.01.0.0
  • Development: v1.0.0-5-g12345671.0.1.dev5+g1234567
  • Dirty working tree: v1.0.0-dirty1.0.1.dev0+dirty

Building and Testing

# Install development dependencies
pip install -e ".[dev]"

# Run tests
python -m pytest tests.py -v

# Run linting
python -m ruff check fscraper/
python -m ruff check tests.py

# Format code
python -m black fscraper/ tests.py
python -m ruff check --fix fscraper/ tests.py

# Build package
python -m build

# Check version
python -c "import fscraper; print(fscraper.__version__)"

Publishing

# Upload to TestPyPI (for testing)
python -m twine upload --repository testpypi dist/*

# Upload to PyPI (for production)
python -m twine upload dist/*

About

Financial Data Web Scraper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published