Spgci

Latest version: v0.0.48

Safety actively analyzes 682382 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.0.41

- Added short-term (monthly) and long-term (annual) price forecast endpoints to the SDK. By default these will also set `isActive=True`, which can be overriden.
- Added outages.


Examples taken from readme:
python
chem.get_short_term_prices(commodity="Acetone", delivery_region="US Gulf Coast")
DataFrame of short-term (monthly) price forecasts for Acetone delivered to the US Gulf Coast.

chem.get_outages(
start_date_gte="2023-01-01",
capacity_gte=500,
alert_status=['Confirmed']
)
DataFrame of chemical plant outages since Jan 1, 2023 where the capacity impacted is >= 500 and the status is `Confirmed`.

0.0.40

Added 3 chemicals endpoints:
- Average Annual Capacities
- Capacity Events
- Capacity to Consume

usage examples are covered in the readme.md
> [!NOTE]
> This library sets isActive to `True` by default for this dataset. you can override this by setting `is_active=[True,False]` if you would like to see inactive records.

python
import spgci as ci

chem = ci.Chemicals()

chem.get_capacity_events(
event_begin_date_gt="2023-01-01", country="China", event_type=["expand", "startup"]
)
DataFrame of capacity events in plants in China, that are either "expand" or "startup" since 2023-01-01

chem.get_capacity_to_consume(is_active=[True, False], commodity="Polybutadiene rubber")
DateFrame of capacities to consume. Setting `is_active` to [True, False] allows you to include records that were corrected or removed which is useful for Point-In-Time analysis.

0.0.39

- Bumped minimum Python version to 3.9 (from 3.7)
- Switched from using distutils to packaging ([distutils has been deprecated](https://peps.python.org/pep-0632/) as of Python 3.10.
- Added Structured Heards

python
import spgci as ci

sh = ci.StructuredHeards()

sh.get_markets() see the list of available markets

sh.get_heards(market="Americas crude oil") market is a required field

0.0.37

Added support for LNG Netbacks

for example:
python
import spgci as ci

lng = ci.LNGGlobalAnalytics()

lng.get_netbacks(import_geography="Brazil", date_gte="2024-01-01")

0.0.35

Added Support for Pandas 2.0. By default the library will install pandas 2.x if possible. If not possible it will use Pandas 1.x.

What this typically means is if you have Pandas 2.x installed already this library will not uninstall it and install 1.5.

0.0.34

Added support for Weather

python
import spgci as ci

w = ci.Weather()

w.get_forecast(city="Boston")
DataFrame of forecasts for Boston

w.get_forecast(market="United States", weather_date_gte="2024-01-01", weather_date_lte="2024-01-31")
DateFrame of forecasts in the United States in January 2024.

w.get_actual(market="Hong Kong", paginate=True)
DataFrame of actual weather in Hong Kong, paginate=True to get full history.



Also added support for start_date and end_date filtering in get_arbitrage:
python
import spgci as ci

af = ci.ArbFlow()

af.get_arbitrage(
base_margin_id=261,
margin_id=1380,
frequency_id=1,
start_date="2024-01-01",
end_date="2024-01-20",
)

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.