line-item-manager


Nameline-item-manager JSON
Version 0.2.13 PyPI version JSON
download
home_pagehttps://github.com/prebid/line-item-manager
SummaryCreate and manage line items.
upload_time2024-09-27 18:14:01
maintainerNone
docs_urlNone
authorthe prebid contributors
requires_python>=3.8
licenseApache Software License 2.0
keywords line-item-manager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =================
line-item-manager
=================


.. image:: https://img.shields.io/pypi/v/line_item_manager.svg
        :target: https://pypi.python.org/pypi/line_item_manager




Create and manage line items.


* Free software: Apache Software License 2.0
* Documentation: https://docs.prebid.org/tools/line-item-manager.html


Example Workflow
----------------

1. Save and edit a copy of the package config
::

   $ line_item_manager show config > my_config.yml

2. List bidder codes and names for reference
::

   $ line_item_manager show bidders

3. Do a dry run to see if everything looks right
::

   $ line_item_manager create my_config.yml \
   --dry-run \
   --private-key-file my_gam_creds.json \
   --network-code 12345678 \
   --network-name Publisher_GAM_Name \
   --bidder-code rubicon \
   --bidder-code ix

4. Do a test run creating a limited number of line items for visual inspection
::

   $ line_item_manager create my_config.yml \
   --test-run \
   --private-key-file my_gam_creds.json \
   --network-code 12345678 \
   --network-name Publisher_GAM_Name \
   --bidder-code rubicon \
   --bidder-code ix

5. Create line items
::

   $ line_item_manager create my_config.yml \
   --private-key-file my_gam_creds.json \
   --network-code 12345678 \
   --network-name Publisher_GAM_Name \
   --bidder-code rubicon \
   --bidder-code ix

Advanced Features
-----------------

1. Use a custom line item template
::

   # 1. save and edit a copy of the default line item template
   $ line_item_manager show template > my_template.yml

   # 2. edit my_template.yml; e.g. add geoTargeting to exclude locations

   # 3. create line items referencing your custom template
   $ line_item_manager create my_config.yml \
   --single-order \
   --template my_template.yml

2. Use a custom settings file
::

   # 1. save and edit a copy of the default settings
   $ line_item_manager show settings > my_settings.yml

   # 2. edit my_settings.yml; e.g. use a custom bidder code

   # 3. create line items referencing your custom settings
   $ line_item_manager create my_config.yml \
   --single-order \
   --settings my_settings.yml

3. Use a custom schema file
::

   # 1. save and edit a copy of the default schema
   $ line_item_manager show schema > my_schema.yml

   # 2. edit my_schema.yml; e.g. use a custom currency list

   # 3. create line items referencing your custom schema
   $ line_item_manager create my_config.yml \
   --single-order \
   --schema my_schema.yml

Local Development
-----------------

Installing and running line_item_manager locally using docker
::

   $ git clone git://github.com/prebid/line-item-manager
   $ cd line-item-manager
   $ command='line_item_manager' extra_args='--help' make docker-run

Configuration
-------------

See this default config_ that you can edit for your own purposes.

Configure access to Google Ad Manager
-------------------------------------

In order to use line-item-manager, you need to provide JSON private key file and configure access to your Google Ad manager account:

1. In Google API Console generate private key file for service account
2. In Google Ad Manager enable API access and create new services user with Administrator role.

See `detailed instructions <https://developers.google.com/ad-manager/api/authentication#oauth>`_ in documentation of GAM authentication.

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _`config`: https://github.com/prebid/line-item-manager/blob/master/line_item_manager/conf.d/line_item_manager.yml
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.2.13 (2024-08-29)
-------------------
* Deprecate Python 3.7
* Upgrade Google Ad Manager API to v202408
* Upgrade Python package Click to 8.1.7
* Upgrade Python package jsonschema to 4.23.0

0.2.12 (2023-10-09)
-------------------
* Example script: Activate targeting values by network code, key Id and names (#149)

0.2.11 (2023-09-29)
-------------------
* Expanded currency list to include GAM currencies
* CLI support for custom settings and schema files for advanced users (#138)
* Upgraded PyYAML and googleads packages (#144)
* Python 3.11 support (#140)

0.2.10 (2023-08-30)
-------------------
* BUG FIX: Error for unsupported GAM API version is not handled properly (#116)
* BUG FIX: bidder-data.csv has spaces, causing line-item-manager to not find line items (#128)
* Update Google Ad Manager to v202308 (#129)

0.2.9 (2022-08-23)
-------------------
* Update Google Ad Manager to v202208 (#96)
* BUG FIX: tests expect 'oneVideo' to be a Prebid listed bidder (#109)
* Support size override for video (#111)

0.2.8 (2022-05-24)
-------------------
* BUG FIX: Specify CA certificates file when reading bidders data file (#104)
* Update Google Ad Manager to v202108 (#95)

0.2.7 (2022-05-17)
-------------------
* default creative duration to match max duration (that is currently 30000 milliseconds)
* support config duration in creative block

0.2.6 (2022-02-08)
-------------------
* Require Python >=3.7 (3.6 EOL DEC 23 2021)

0.2.5 (2022-02-08)
-------------------
* Update Google Ad Manager to v202105 (#93)
* Remove Python 3.6 and add 3.10 support (#91)
* Support for more line item types (sponsorship line item creation) (#86)
* BUG FIX: Certain currency values are invalid (#73)

0.2.4 (2021-12-01)
-------------------
* Update Google Ad Manager to v202102 (#63)
* Support Team ID (#77)
* Support LineItem.videoMaxDuration required in v202102 (#80)

0.2.3 (2021-05-26)
-------------------

* BUG FIX: datetime.timezone objects did not include zone name (#68)
* Support use of a custom line-item template (#65)
* Update bumpversion (depracated) and pytest-runner (out-of-date) (#62)

0.2.2 (2021-04-23)
-------------------

* Support reportableType settings for CustomTargetingKey (#55)
* Support for advertisers of different types (#48)
* BUG FIX: Custom targeting hb_bidder contains all key-values (#43)
* Upgrade jinja2 to 2.11.3 due to security vulnerabilities (#51)
* Upgrade PyYAML due to security vulnerabilities (#56)
* Remove requirements_dev.txt; not needed and introducing CVEs (#58)

0.2.1 (2021-02-23)
-------------------

* README includes steps to configure access to Google Ad Manager (#39)
* README includes link to prebid documentation (#40)

0.2.0 (2021-02-16)
-------------------

* Beta release

0.1.16 (2021-02-11)
-------------------

* BUG FIX: VAST URL should reference the 'uuid' targeting key in default template config (#32)
* Video creative duration set to 1 second to be consistent with Prebid documentation (#31)
* Custom targeting support for using 'IS_NOT' operator (#35)

0.1.15 (2021-02-09)
-------------------

* BUG FIX: Error during line item creative associaiton (#25)
* BIG FIX: Bidder Targeting Key status is 'INACTIVE' (#23)
* Added directory of helpful bin scripts (examples/bin) (#22)
* Added bin script (examples/bin/archive_order.py) for archiving orders (#21)

0.1.14 (2021-01-25)
-------------------

* CLI Help: noted that tests are not auto-archived

0.1.13 (2021-01-22)
-------------------

* First release to production PyPI
* Github action for publishing

0.1.12 (2021-01-12)
-------------------

* Support for Python 3.9
* Prebid and PrebidBidder classes added
* Type hints added
* Docstrings added
* Removed unused travis and tox support

0.1.11 (2020-12-17)
-------------------

* CLI option to display package version (#4)
* Schema invalidation of unrecognized config properties (#5)
* Support all bidder keys in config override map (#9)

0.1.10 (2020-12-15)
-------------------

* FEATURE: prebid recommended size override for banner creatives (#1)

0.1.9 (2020-12-11)
------------------

* BUG FIX: multi-line template assignments not parsed correctly (#2)

0.1.8 (2020-12-7)
------------------

* Support for including a custom line item priority.

0.1.7 (2020-12-4)
------------------

* Testing: Additional coverage.
* Conditional schema definitions.

0.1.6 (2020-12-3)
------------------

* Added 'Run of network' default inventory targeting
* Added predefined Prebid granularity types
* Dockerfile python change to slim from alpine

0.1.5 (2020-12-1)
------------------

* Fixed missing History.

0.1.4 (2020-12-1)
------------------

* Code cleanup. Deletion of unused code.
* Testing: Additional coverage.

0.1.3 (2020-11-30)
------------------

* Testing: Additional coverage.

0.1.2 (2020-11-29)
------------------

* Bug Fix: microAmount not properly assigned in line item
* Testing: Mock Ad Client and initial tests  

0.1.1 (2020-11-24)
------------------

* Auto-archive Orders on failure or interruption.

0.1.0 (2020-11-23)
------------------

* First release on Test PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/prebid/line-item-manager",
    "name": "line-item-manager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "line-item-manager",
    "author": "the prebid contributors",
    "author_email": "info@prebid.org",
    "download_url": "https://files.pythonhosted.org/packages/da/09/bf749feade6e133e0eeaf6a594565a64540250a3557eedb852d8d94630c5/line_item_manager-0.2.13.tar.gz",
    "platform": null,
    "description": "=================\nline-item-manager\n=================\n\n\n.. image:: https://img.shields.io/pypi/v/line_item_manager.svg\n        :target: https://pypi.python.org/pypi/line_item_manager\n\n\n\n\nCreate and manage line items.\n\n\n* Free software: Apache Software License 2.0\n* Documentation: https://docs.prebid.org/tools/line-item-manager.html\n\n\nExample Workflow\n----------------\n\n1. Save and edit a copy of the package config\n::\n\n   $ line_item_manager show config > my_config.yml\n\n2. List bidder codes and names for reference\n::\n\n   $ line_item_manager show bidders\n\n3. Do a dry run to see if everything looks right\n::\n\n   $ line_item_manager create my_config.yml \\\n   --dry-run \\\n   --private-key-file my_gam_creds.json \\\n   --network-code 12345678 \\\n   --network-name Publisher_GAM_Name \\\n   --bidder-code rubicon \\\n   --bidder-code ix\n\n4. Do a test run creating a limited number of line items for visual inspection\n::\n\n   $ line_item_manager create my_config.yml \\\n   --test-run \\\n   --private-key-file my_gam_creds.json \\\n   --network-code 12345678 \\\n   --network-name Publisher_GAM_Name \\\n   --bidder-code rubicon \\\n   --bidder-code ix\n\n5. Create line items\n::\n\n   $ line_item_manager create my_config.yml \\\n   --private-key-file my_gam_creds.json \\\n   --network-code 12345678 \\\n   --network-name Publisher_GAM_Name \\\n   --bidder-code rubicon \\\n   --bidder-code ix\n\nAdvanced Features\n-----------------\n\n1. Use a custom line item template\n::\n\n   # 1. save and edit a copy of the default line item template\n   $ line_item_manager show template > my_template.yml\n\n   # 2. edit my_template.yml; e.g. add geoTargeting to exclude locations\n\n   # 3. create line items referencing your custom template\n   $ line_item_manager create my_config.yml \\\n   --single-order \\\n   --template my_template.yml\n\n2. Use a custom settings file\n::\n\n   # 1. save and edit a copy of the default settings\n   $ line_item_manager show settings > my_settings.yml\n\n   # 2. edit my_settings.yml; e.g. use a custom bidder code\n\n   # 3. create line items referencing your custom settings\n   $ line_item_manager create my_config.yml \\\n   --single-order \\\n   --settings my_settings.yml\n\n3. Use a custom schema file\n::\n\n   # 1. save and edit a copy of the default schema\n   $ line_item_manager show schema > my_schema.yml\n\n   # 2. edit my_schema.yml; e.g. use a custom currency list\n\n   # 3. create line items referencing your custom schema\n   $ line_item_manager create my_config.yml \\\n   --single-order \\\n   --schema my_schema.yml\n\nLocal Development\n-----------------\n\nInstalling and running line_item_manager locally using docker\n::\n\n   $ git clone git://github.com/prebid/line-item-manager\n   $ cd line-item-manager\n   $ command='line_item_manager' extra_args='--help' make docker-run\n\nConfiguration\n-------------\n\nSee this default config_ that you can edit for your own purposes.\n\nConfigure access to Google Ad Manager\n-------------------------------------\n\nIn order to use line-item-manager, you need to provide JSON private key file and configure access to your Google Ad manager account:\n\n1. In Google API Console generate private key file for service account\n2. In Google Ad Manager enable API access and create new services user with Administrator role.\n\nSee `detailed instructions <https://developers.google.com/ad-manager/api/authentication#oauth>`_ in documentation of GAM authentication.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _`config`: https://github.com/prebid/line-item-manager/blob/master/line_item_manager/conf.d/line_item_manager.yml\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.2.13 (2024-08-29)\n-------------------\n* Deprecate Python 3.7\n* Upgrade Google Ad Manager API to v202408\n* Upgrade Python package Click to 8.1.7\n* Upgrade Python package jsonschema to 4.23.0\n\n0.2.12 (2023-10-09)\n-------------------\n* Example script: Activate targeting values by network code, key Id and names (#149)\n\n0.2.11 (2023-09-29)\n-------------------\n* Expanded currency list to include GAM currencies\n* CLI support for custom settings and schema files for advanced users (#138)\n* Upgraded PyYAML and googleads packages (#144)\n* Python 3.11 support (#140)\n\n0.2.10 (2023-08-30)\n-------------------\n* BUG FIX: Error for unsupported GAM API version is not handled properly (#116)\n* BUG FIX: bidder-data.csv has spaces, causing line-item-manager to not find line items (#128)\n* Update Google Ad Manager to v202308 (#129)\n\n0.2.9 (2022-08-23)\n-------------------\n* Update Google Ad Manager to v202208 (#96)\n* BUG FIX: tests expect 'oneVideo' to be a Prebid listed bidder (#109)\n* Support size override for video (#111)\n\n0.2.8 (2022-05-24)\n-------------------\n* BUG FIX: Specify CA certificates file when reading bidders data file (#104)\n* Update Google Ad Manager to v202108 (#95)\n\n0.2.7 (2022-05-17)\n-------------------\n* default creative duration to match max duration (that is currently 30000 milliseconds)\n* support config duration in creative block\n\n0.2.6 (2022-02-08)\n-------------------\n* Require Python >=3.7 (3.6 EOL DEC 23 2021)\n\n0.2.5 (2022-02-08)\n-------------------\n* Update Google Ad Manager to v202105 (#93)\n* Remove Python 3.6 and add 3.10 support (#91)\n* Support for more line item types (sponsorship line item creation) (#86)\n* BUG FIX: Certain currency values are invalid (#73)\n\n0.2.4 (2021-12-01)\n-------------------\n* Update Google Ad Manager to v202102 (#63)\n* Support Team ID (#77)\n* Support LineItem.videoMaxDuration required in v202102 (#80)\n\n0.2.3 (2021-05-26)\n-------------------\n\n* BUG FIX: datetime.timezone objects did not include zone name (#68)\n* Support use of a custom line-item template (#65)\n* Update bumpversion (depracated) and pytest-runner (out-of-date) (#62)\n\n0.2.2 (2021-04-23)\n-------------------\n\n* Support reportableType settings for CustomTargetingKey (#55)\n* Support for advertisers of different types (#48)\n* BUG FIX: Custom targeting hb_bidder contains all key-values (#43)\n* Upgrade jinja2 to 2.11.3 due to security vulnerabilities (#51)\n* Upgrade PyYAML due to security vulnerabilities (#56)\n* Remove requirements_dev.txt; not needed and introducing CVEs (#58)\n\n0.2.1 (2021-02-23)\n-------------------\n\n* README includes steps to configure access to Google Ad Manager (#39)\n* README includes link to prebid documentation (#40)\n\n0.2.0 (2021-02-16)\n-------------------\n\n* Beta release\n\n0.1.16 (2021-02-11)\n-------------------\n\n* BUG FIX: VAST URL should reference the 'uuid' targeting key in default template config (#32)\n* Video creative duration set to 1 second to be consistent with Prebid documentation (#31)\n* Custom targeting support for using 'IS_NOT' operator (#35)\n\n0.1.15 (2021-02-09)\n-------------------\n\n* BUG FIX: Error during line item creative associaiton (#25)\n* BIG FIX: Bidder Targeting Key status is 'INACTIVE' (#23)\n* Added directory of helpful bin scripts (examples/bin) (#22)\n* Added bin script (examples/bin/archive_order.py) for archiving orders (#21)\n\n0.1.14 (2021-01-25)\n-------------------\n\n* CLI Help: noted that tests are not auto-archived\n\n0.1.13 (2021-01-22)\n-------------------\n\n* First release to production PyPI\n* Github action for publishing\n\n0.1.12 (2021-01-12)\n-------------------\n\n* Support for Python 3.9\n* Prebid and PrebidBidder classes added\n* Type hints added\n* Docstrings added\n* Removed unused travis and tox support\n\n0.1.11 (2020-12-17)\n-------------------\n\n* CLI option to display package version (#4)\n* Schema invalidation of unrecognized config properties (#5)\n* Support all bidder keys in config override map (#9)\n\n0.1.10 (2020-12-15)\n-------------------\n\n* FEATURE: prebid recommended size override for banner creatives (#1)\n\n0.1.9 (2020-12-11)\n------------------\n\n* BUG FIX: multi-line template assignments not parsed correctly (#2)\n\n0.1.8 (2020-12-7)\n------------------\n\n* Support for including a custom line item priority.\n\n0.1.7 (2020-12-4)\n------------------\n\n* Testing: Additional coverage.\n* Conditional schema definitions.\n\n0.1.6 (2020-12-3)\n------------------\n\n* Added 'Run of network' default inventory targeting\n* Added predefined Prebid granularity types\n* Dockerfile python change to slim from alpine\n\n0.1.5 (2020-12-1)\n------------------\n\n* Fixed missing History.\n\n0.1.4 (2020-12-1)\n------------------\n\n* Code cleanup. Deletion of unused code.\n* Testing: Additional coverage.\n\n0.1.3 (2020-11-30)\n------------------\n\n* Testing: Additional coverage.\n\n0.1.2 (2020-11-29)\n------------------\n\n* Bug Fix: microAmount not properly assigned in line item\n* Testing: Mock Ad Client and initial tests  \n\n0.1.1 (2020-11-24)\n------------------\n\n* Auto-archive Orders on failure or interruption.\n\n0.1.0 (2020-11-23)\n------------------\n\n* First release on Test PyPI.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Create and manage line items.",
    "version": "0.2.13",
    "project_urls": {
        "Homepage": "https://github.com/prebid/line-item-manager"
    },
    "split_keywords": [
        "line-item-manager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42f7e97c88ea03e7aeb219eca36828008a940af20febccdd073a0f0de91feeed",
                "md5": "041fc13a5104d6061005305fa3a3287b",
                "sha256": "0866ccc08b1769a3c6a5fe3e4466f85c2032121ccad148910ab29517a0f90184"
            },
            "downloads": -1,
            "filename": "line_item_manager-0.2.13-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "041fc13a5104d6061005305fa3a3287b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 30528,
            "upload_time": "2024-09-27T18:14:00",
            "upload_time_iso_8601": "2024-09-27T18:14:00.791967Z",
            "url": "https://files.pythonhosted.org/packages/42/f7/e97c88ea03e7aeb219eca36828008a940af20febccdd073a0f0de91feeed/line_item_manager-0.2.13-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da09bf749feade6e133e0eeaf6a594565a64540250a3557eedb852d8d94630c5",
                "md5": "e2b2a471a8858ff32570fa3c6770d16c",
                "sha256": "cd8a53f002f625c92c7b08413d9fa7fa0818e027de96e22de5ccb84be4b863fd"
            },
            "downloads": -1,
            "filename": "line_item_manager-0.2.13.tar.gz",
            "has_sig": false,
            "md5_digest": "e2b2a471a8858ff32570fa3c6770d16c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 47211,
            "upload_time": "2024-09-27T18:14:01",
            "upload_time_iso_8601": "2024-09-27T18:14:01.926331Z",
            "url": "https://files.pythonhosted.org/packages/da/09/bf749feade6e133e0eeaf6a594565a64540250a3557eedb852d8d94630c5/line_item_manager-0.2.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 18:14:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "prebid",
    "github_project": "line-item-manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "line-item-manager"
}
        
Elapsed time: 0.34936s