Skip to content

Commit 7d6fc87

Browse files
author
markzegarelli
authored
Update Analytics import statement to avoid error (#3680)
1 parent d99fac2 commit 7d6fc87

File tree

1 file changed

+6
-6
lines changed
  • src/connections/sources/catalog/libraries/server/python

1 file changed

+6
-6
lines changed

src/connections/sources/catalog/libraries/server/python/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you're using a system for managing dependencies, you'll want to pin the libra
2323
Inside your app, you'll want to **set your `write_key`** before making any analytics calls:
2424

2525
```python
26-
import analytics
26+
import segment.analytics as analytics
2727

2828
analytics.write_key = 'YOUR_WRITE_KEY'
2929
```
@@ -344,7 +344,7 @@ assert d.tzinfo is not None and d.tzinfo.utcoffset(d) is not None
344344
```python
345345
import dateutil.parser
346346

347-
import analytics
347+
import segment.analytics as analytics
348348
analytics.write_key = 'YOUR_WRITE_KEY'
349349

350350
log = [
@@ -475,7 +475,7 @@ To add analytics to your Django web server, you need to include the initializati
475475

476476
```python
477477
from django.apps import AppConfig
478-
import analytics
478+
import segment.analytics as analytics
479479

480480
class MyAppConfig(AppConfig):
481481

@@ -524,7 +524,7 @@ and turn on module logging in your initialization call in `urls.py`.
524524

525525
```python
526526
import logging
527-
import analytics
527+
import segment.analytics as analytics
528528

529529
analytics.debug = True # turn on debug logging
530530
analytics.write_key = 'YOUR_WRITE_KEY'
@@ -567,7 +567,7 @@ Be sure to see the full [reference of supported keys](/docs/connections/spec/com
567567
Check that you have the most recent version.
568568

569569
```
570-
python -c "import analytics; print analytics.VERSION"
570+
python -c "import segment.analytics as analytics; print analytics.VERSION"
571571
```
572572

573573
Does it match [the most current version](https://github.com/segmentio/analytics-python/blob/master/analytics/version.py#L2)?
@@ -591,7 +591,7 @@ easy_install --upgrade segment-analytics-python
591591
In some cases, you will want to disable threads and send each request synchronously. To do so, you can use the `sync_mode` option:
592592

593593
```python
594-
import analytics
594+
import segment.analytics as analytics
595595

596596
analytics.write_key = 'YOUR_WRITE_KEY'
597597
analytics.sync_mode = True

0 commit comments

Comments
 (0)