From b3f97059f115a82d9508c2325eb427bb981b6769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Coelho?= <16445494+jcoelho93@users.noreply.github.com> Date: Wed, 1 May 2024 09:25:52 +0100 Subject: [PATCH] Rename module --- README.md | 2 +- pyproject.toml | 3 +++ {python_trading212 => trading212}/__init__.py | 4 ++-- {python_trading212 => trading212}/models.py | 0 {python_trading212 => trading212}/trading212.py | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) rename {python_trading212 => trading212}/__init__.py (67%) rename {python_trading212 => trading212}/models.py (100%) rename {python_trading212 => trading212}/trading212.py (99%) diff --git a/README.md b/README.md index 444c894..82a430b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ export TRADING_212_KEY= ``` ```python -from python_trading212 import Trading212, Pie +from trading212 import Trading212, Pie trading212 = Trading212() pie: Pie = trading212.fetch_pie(123) diff --git a/pyproject.toml b/pyproject.toml index 11d78c8..6592924 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,9 @@ version = "1.0.0" description = "An unofficial client for the official Trading212 API" authors = ["José Coelho <16445494+jcoelho93@users.noreply.github.com>"] readme = "README.md" +packages = [ + { include = "trading212", from = "." } +] [tool.poetry.dependencies] python = "^3.12" diff --git a/python_trading212/__init__.py b/trading212/__init__.py similarity index 67% rename from python_trading212/__init__.py rename to trading212/__init__.py index 9271bae..d9f6408 100644 --- a/python_trading212/__init__.py +++ b/trading212/__init__.py @@ -1,5 +1,5 @@ -from python_trading212.trading212 import Trading212 # noqa -from python_trading212.models import ( # noqa +from trading212.trading212 import Trading212 # noqa +from trading212.models import ( # noqa Position, Exchange, Instrument, Pie, Order, AccountCash, AccountMetadata, HistoricalOrderData, LimitOrder, MarketOrder, diff --git a/python_trading212/models.py b/trading212/models.py similarity index 100% rename from python_trading212/models.py rename to trading212/models.py diff --git a/python_trading212/trading212.py b/trading212/trading212.py similarity index 99% rename from python_trading212/trading212.py rename to trading212/trading212.py index 927a50a..f2b7601 100644 --- a/python_trading212/trading212.py +++ b/trading212/trading212.py @@ -2,7 +2,7 @@ import requests from typing import List, Dict from requests.exceptions import HTTPError -from python_trading212.models import ( +from trading212.models import ( Position, Exchange, Instrument, Pie, Order, AccountCash, AccountMetadata, HistoricalOrderData, LimitOrder, MarketOrder,